npm.io
1.1.0 • Published 7 years ago

error-with-object

Licence
MIT
Version
1.1.0
Deps
0
Size
3 kB
Vulns
0
Weekly
0

error-with-object

Build Status David DM GitHub code size in bytes GitHub package.json version GitHub

The inbuilt Error class but that accepts objects

Example Usage

const ErrorWithObject = require('error-with-object');
throw new ErrorWithObject({
  message: 'Something went wrong',
  code: 'SOMETHING_WENT_WRONG',
  anythingElse: 'no'
});

License

This project is licensed under the terms of the MIT license.