-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add error handlers for non-interactive operation #18
Comments
Yeah, it should either bail or continue processing other records. I'll look into that. Unfortunately that file is junk and they won't release a new one via the public site for a month or so. |
It will now exit with -1 as soon as the error happens. It turns out it's actually rather complicated to handle that nicely. The code is grouping several promises for several db writes into a single promise. If one fails (as it did here) then the overall promise is rejected and the error handling then displays the message, closes the database and tries to exit. While the other promises are also rejected, they are not cancelled so they continue to use the database after it has been closed. |
IMO it's a decent async workaround to the usual way of having something like |
I've kinda mentioned it before in #7 (comment) so apologies if it's a non-issue, feel free to close, won't mention it again.
Problem looks like this:
And so on for hundreds more lines instead of an exit with error code as soon as actual fatal error happens.
This effectively prevents the tool to be used in a usual unix-y non-interactive fashion - e.g. a script that does --fares && --timetable && other stuff, requiring user to "baby-sit" it in case it throws bunch of errors like that instead of failing, which looks like a bug.
The text was updated successfully, but these errors were encountered: