-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
hledger-flow should exit with a non-zero error code if a journal construct invocation results in ExitFailure #28
Comments
Another example of ExitFailure that did not cause hledger-flow to exit with a non-zero code (a parsing error in a .rules file)
|
Nice catch! I'll look at this as soon as I can make some time. |
I've made a change that I think should fix the issue, but I have only tested it briefly. There should be a pre-release uploaded soon, if the build succeeds: Otherwise you can build this using branch |
This should be fix now, please let me know if you see any other issues |
As an optional usability improvement bonus, I would suggest adding a final one-line log statement like
Just before hledger-flow exits. |
@lestephane The error output in the latest release now looks something like this:
Let me know if you can think of more usability improvements. |
Background
I have PDF statements from my bank which i convert using a
construct
script (combination of pdftotext and awk script).During the
hledger-flow import
invocation, I see some error, and indeed the corresponding journal is never created.the problem is twofold:
YYYY-include.journal
file that contains the!include
of a file that does not exist on the filesystem in3-journal
import
command did not return a non-zero exit code (despite the construct ExitFailure 1). So, one will only see a problem later (potentially days later), when loading the files with hledger. By then the user won't know what made his file disappear.The text was updated successfully, but these errors were encountered: