make-error
Make your own error types!
Features
Compatible Node & browsers
instanceofsupporterror.name&error.stacksupportcompatible with CSP (i.e. no
eval())
Installation
Node & Browserify/Webpack
Installation of the npm package:
> npm install --save make-errorThen require the package:
var makeError = require("make-error");Browser
You can directly use the build provided at unpkg.com:
Usage
Basic named error
Advanced error class
Specialized error
Inheritance
Best for ES2015+.
Related
make-error-cause: Make your own error types, with a cause!
Contributions
Contributions are very welcomed, either on the documentation or on the code.
You may:
report any issue you've encountered;
fork and create a pull request.
License
ISC © Julien Fontanet
Last updated
