@scaleleap/error
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@scaleleap/error

Extendable error class.

Install

npm i @scaleleap/error

Usage

// in ./src/config.ts

import { Error } from '@scaleleap/config'

class MyError extends Error {}

const err = new MyError('Error code: %s', 404)

throw err

Documentation

  • Uses format from util module to format the error message.
  • Provides source map support to produce correct source information in the stack trace.
  • Highlights error messages in development.

License

MIT © Scale Leap

Readme

Keywords

none

Package Sidebar

Install

npm i @scaleleap/error

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

10.1 kB

Total Files

12

Last publish

Collaborators

  • scalebot
  • moltar