1.1.0 • Published 4 years ago
error-with-object v1.1.0
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.