nodules / terror

Base error class which will help you organize errors, generate informative logs and as result grep logs more effectively
MIT License
25 stars 7 forks source link

Method `ensureError` works incorrectly for errors inherited from Terror #13

Closed zoobestik closed 10 years ago

zoobestik commented 10 years ago

ensureError should return instance of the owning class.

For example:

try {
    throw new Terror('foo');
} catch(err) {
   console.log(MyError.ensureError(err) instanceof MyError); // false, but why?
}
zoobestik commented 10 years ago

:up: fixed

kaero commented 10 years ago

Thanks!

kaero commented 10 years ago

Will be released in 1.0.0 as the issue #12 will be done.