honza / node-thumbnail

Thumbnail worker queue for node.js
http://honza.ca/node-thumbnail/
Other
103 stars 23 forks source link

Improve error handling for missing src/dest #12

Closed oksas closed 7 years ago

oksas commented 7 years ago

Error messages previously did not distinguish between an invalid source input or destination input as the cause of the error, so this simple change clarifies what exactly the issue when console logging in the event of invalid input. There are now separate warnings for (1) if source doesn't exist, (2) if destination doesn't exist, or (3) if both don't exist, so someone encountering one of these issues will hopefully be able to address things more easily. Hope that's clear; let me know if there are any questions 🌮

honza commented 7 years ago

A couple of minor things, looks good otherwise!

oksas commented 7 years ago

I made the changes requested, let me know how it looks! I think the indentation stuff must have been a tabs vs spaces issue on my editor's end. Should be all good to go now though.

honza commented 7 years ago

Sorry, it's still there, further down the file.

oksas commented 7 years ago

Ah thank you, sorry I missed that one. Should be fixed now. Have you considered installing something like eslint as a dev dependency? It would certainly make issues like that easier to track down.

honza commented 7 years ago

Ah, yes, let me set up a travis job for that!

honza commented 7 years ago

Thanks for this! :sparkles:

oksas commented 7 years ago

Awesome, sounds great. Thanks man 🌮 🌮