Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is.error() does not recognise sub-classes of Error as errors #301

Open
bbusschots-mu opened this issue Aug 7, 2019 · 0 comments
Open

is.error() does not recognise sub-classes of Error as errors #301

bbusschots-mu opened this issue Aug 7, 2019 · 0 comments

Comments

@bbusschots-mu
Copy link

I have custom error classes in my code that are properly sub-classed from Error using the very convenient es6-error NPM module. Errors generated with these sub-classes are recognised as instances of Error by JavaScript, i.e. myError instanceof Error evaluates to true. However, is.error() evaluates to false. Surely anything that gets true for instanceof Error should be recognised as an error by is.error()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant