JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1374342
  • Score
    100M100P100Q246184F
  • License MIT

A simple extendable error class that extends Error.

Package Exports

  • extendable-error

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (extendable-error) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.