lehitoskin / ivy

Ivy, the Taggable Image Viewer
GNU General Public License v3.0
16 stars 3 forks source link

Creates simple error handler to exit process. #117

Closed IonoclastBrigham closed 5 years ago

IonoclastBrigham commented 5 years ago

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 #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 commented 5 years ago

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

This might be helpful.

IonoclastBrigham commented 5 years ago

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?