trycatch icon indicating copy to clipboard operation
trycatch copied to clipboard

Stack trace is lost when Error catched inherits from Error base class

Open sebpatu opened this issue 7 years ago • 0 comments

Hi When we use inheritance for error handling, but also for standard error class like ReferenceError etc..., the stack trace is lost. Its because of function isError in formatError.js check is made with Object.prototype.toString.call(err) === '[object Error]' but it should be err instanceof Error; to take inheritance in account Thanks

sebpatu avatar Nov 12 '18 21:11 sebpatu