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

Improve error message #268

Open
pashagolub opened this issue Aug 13, 2024 · 2 comments
Open

Improve error message #268

pashagolub opened this issue Aug 13, 2024 · 2 comments

Comments

@pashagolub
Copy link

pashagolub commented Aug 13, 2024

The error message is not helpful at all:

  • it doesn't tell you where to look for an error
  • it disappears immediately not letting you to copy-paste anything to grep files

image

If I run ledger it's output allows me to find the error easily:

./ledger -f main.ledger
In file included from "main.ledger", line 40:
While parsing file "2024\24-08.ledger", line 71:
While balancing transaction from "2024\24-08.ledger", lines 63-71:
> 2024/08/02 -----------------------------------------------
> 2024/08/02  Transaction description
>     Expenses:foobaz                                40.00 EUR
>     Expenses:foobaz                                20.00 EUR
>     Expenses:foobaz                                20.00 EUR
>     Expenses:foobaz                                20.00 EUR
>     Assets:Checking:Bank1                         -60.00 EUR
>     Assets:Checking:Bank2                         -20.0
Unbalanced remainder is:
           20.00 EUR
Amount to balance against:
          100.00 EUR
Error: Transaction does not balance
@ananthakumaran
Copy link
Owner

I am assuming this because you are looking at the main.ledger file instead of the ledger file that had the actual error? In the latter case, the error would be shown at the editor level.

@pashagolub
Copy link
Author

The error is shown when I'm trying to sync. But if I'm opening editor with main.ledger it doesn't show the error, you're right. And if I am trying to open the exact file, it cannot parse it because it depends on account definitions in the main.ledger :)

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

No branches or pull requests

2 participants