Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better handle errors when parsing a document #879

Closed
xcoulon opened this issue Dec 3, 2021 · 0 comments · Fixed by #880
Closed

Better handle errors when parsing a document #879

xcoulon opened this issue Dec 3, 2021 · 0 comments · Fixed by #880

Comments

@xcoulon
Copy link
Member

xcoulon commented Dec 3, 2021

The parser should not fail when an error occurred while processing a invalid fragment of the document. Instead, it should report the error, discard the block and carry on with the rest of the content.

Also:

  • some steps in the processing pipeline ignore the upstream errors (🤦‍♂️)
  • line numbers should be provided, so the user knows where the error was detected.
@xcoulon xcoulon added this to the v0.7.0 milestone Dec 3, 2021
@xcoulon xcoulon self-assigned this Dec 3, 2021
xcoulon added a commit to xcoulon/libasciidoc that referenced this issue Dec 6, 2021
make sure that all subsequent steps of the pipeline are bypassed
when a DocumentFragment carries and error. Also, include the
`start` and `end` position (as offsets from the beginning of the doc)
for each fragment (with and without errors)

fixes bytesparadise#879

Signed-off-by: Xavier Coulon <[email protected]>
xcoulon added a commit that referenced this issue Dec 6, 2021
make sure that all subsequent steps of the pipeline are bypassed
when a DocumentFragment carries and error. Also, include the
`start` and `end` position (as offsets from the beginning of the doc)
for each fragment (with and without errors)

fixes #879

Signed-off-by: Xavier Coulon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant