error-with-object
v1.1.0
Published
The inbuilt Error class but that accepts objects
Downloads
7
Readme
error-with-object
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.