mhulse / kludgy

Kludgy: A macOS Node.js module/app that generates a random Google Street View desktop wallpaper.
Apache License 2.0
4 stars 2 forks source link

Custom error handling #61

Open mhulse opened 5 years ago

mhulse commented 5 years ago

Would prefer for this code to not console.error/log much, and instead throw custom errors; this would make it the responsibility of the code calling Kludgy class to handle things (like test/example.js).

Here's a spot that could use custom error message (along with the stack trace from the actual error being thrown):

https://github.com/mhulse/kludgy/blob/806185358ceb734864fb1e221d6b8c597bde8b49/index.js#L102-L105