Skip to content

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

@sebpatu

Description

@sebpatu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions