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

Package detail

base-error

seeden19.7k2.0.5

Class extended from javascript Error with support for stack trace

error, extend

readme

Base Error

You are able simpler extend standard Error class. Your new object will be contain stack from original Error object and message.

Example

var BaseError = require('base-error');

var error = new BaseError('Message of error');

(error instanceof Error).should.equal(true);
(error instanceof BaseError).should.equal(true);