dachev / node-crontab

A module for creating, reading, updating, and deleting system cron jobs
189 stars 35 forks source link

`error instanceof Error` should be true #28

Closed timhuff closed 6 years ago

dachev commented 6 years ago

@timhuff I'm not sure what this is referring to. Can you post some context and/or a test case?

timhuff commented 6 years ago

Wow. This was such a shrug report. My bad. I must've been super busy when I wrote this. I believe what I mean to say is that thrown errors should be of type Error. If you look at this search result, you can see that you don't throw Errors. More information on why this is bad can be found here. To fix this, just change throw 'something went wrong' to throw new Error('something went wrong').

dachev commented 6 years ago

@timhuff thanks for the info. Good point, I'll fix it in the next week or two and I'll post a new major release.

dachev commented 6 years ago

@timhuff This has been fixed and released in v1.2.0