Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.

Very long error messages when parsing fails #20

Closed
doriath opened this issue Jun 11, 2023 · 1 comment
Closed

Very long error messages when parsing fails #20

doriath opened this issue Jun 11, 2023 · 1 comment

Comments

@doriath
Copy link
Contributor

doriath commented Jun 11, 2023

When parser fails, error message contains the whole content of the file starting where the error occurred. When parsing a long beancount ledger, the error message is huge. I would like to suggest trimming the error message (the fragment part) to only include the part up to the next new line (or maybe just one or two next linues).

@jcornaz
Copy link
Owner

jcornaz commented Jun 11, 2023

Hi, thanks for the feedback.

Indeed when formating the error for debug, it was printing the full remaining input. I just changed the behavior it is now fixed in 1.0.0-alpha.7. Now the error only prints the line number.

This is not the end of the story though, as I plan to improve further the usefulness of error messages: jcornaz/beancount-parser#41.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants