🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

extendable-error

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extendable-error

A simple extendable error class that extends Error.

latest
Source
npmnpm
Version
0.1.7
Version published
Weekly downloads
2.6M
1.23%
Maintainers
1
Weekly downloads
 
Created
Source

Extendable Error Build Status

A simple abstract extendable error class that extends Error, which handles the error name, message and stack property.

Install

npm install extendable-error --save

Usage

import ExtendableError from 'extendable-error';

class SomeError extends ExtendableError {
  constructor(
    message: string,
    public code: number
  ) {
    super(message);
  }
}

let someError = new SomeError('Some error', 0x0001);

License

MIT License.

FAQs

Package last updated on 15 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts