error-render
v1.0.2
Published
Prettify the details of the errors in the console.
Downloads
9
Maintainers
Readme
error-render
Install
npm install error-render --save
Usage
var er = require('error-render');
var error = new Error('Whoops !');
// pretty error with the details (metadata)
console.error(er.details(error));
// shortcut of console.error(er.details(error));
er.log(error)
Pretty JSON
er.prettyJson(error);
Pretty error without the metadata of the error instance
var pe = new er.PrettyError();
console.error(pe.render(error));
Provided by pretty-error
Unit tests
error-render
is tested with Unit.js
Run the tests
cd node_modules/error-render
npm test
LICENSE
Author
| | |---| | Nicolas Talle | |