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

Creates simple error handler to exit process. #117

Merged
merged 2 commits into from
Nov 2, 2019

Conversation

IonoclastBrigham
Copy link
Collaborator

@IonoclastBrigham IonoclastBrigham commented Oct 31, 2019

Summary

So this seems to work, if perhaps somewhat ungracefully. It simply sets an error handler if we're not showing the gui, which prints the error and exits.

Caveats

  1. I didn't totally get all the subtleties of the comments on Commandline invokations should fully exit with a non-zero status, on unrecoverable errors #81, so this doesn't do anything fancy besides just bail from the process altogether.
  2. Probably a better way to print the error message; it's kinda ugly as-is

Feedback Welcome

Please!

@lehitoskin
Copy link
Owner

lehitoskin commented Oct 31, 2019

Instead of vomiting out the exception struct as-is, we could obtain only the message and print that out.

This might be helpful.

@IonoclastBrigham IonoclastBrigham changed the title WIP #81: creates simple error handler to exit process. Creates simple error handler to exit process. Nov 1, 2019
@IonoclastBrigham
Copy link
Collaborator Author

Niced up error message formatting with the latest commit. I didn't really grok what you were saying about using (exit:on-exit), so there's still nothing going on there. But I'm not sure we need a lot of explicit cleanup since we're totally killing the process here in a non-gui context?

@lehitoskin lehitoskin merged commit 5945f1d into lehitoskin:master Nov 2, 2019
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

Successfully merging this pull request may close these issues.

2 participants