Shopify / seafoam-desktop

MIT License
3 stars 5 forks source link

Improve logging and error display #54

Closed nirvdrum closed 3 years ago

nirvdrum commented 3 years ago

Fixes #49: Add error display.

wildmaples commented 3 years ago

Code looks good to me! Thanks for arranging the commits well for me to follow. Is there a way to test these changes? How did you force the error? @nirvdrum

nirvdrum commented 3 years ago

Testing is something we'll need to tackle in general at some point. Some of this could be tested with the same tools to test React applications, but I don't know what functional testing tools exist for Electron.

Since there's error-handling in both the main and the renderer processes, I induced errors in each to see how it went. For the main process, the one that Electron runs in, I just uninstalled Seafoam. Then any action that would try to invoke the seafoam command failed. For the renderer process, I just added a throw "bad error" call somewhere in the React application.