Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@textpress/extendable-error

textpress1MIT0.6.3

Extendable error class for nodejs

readme

Example

import ExtendableError from "@textpress/extendable-error"

class MyError extends ExtendableError {
    constructor( name, extra ) {
        super( name, extra );
    }
}

const error = new MyError( "this is test", { extra: "data" }  )
console.error( error ); 

Output

MyError: this is test
    { extra: 'data' }
    at ...