@scaleleap/error
v1.0.0
Published
Extendable error object.
Downloads
3
Readme
@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
fromutil
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