Skip to content

Nicolab/node-error-render

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

error-render

Actual version published on NPM Dependencies

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

MIT license

Author

Nicolas Tallefourtane - Nicolab.net
Nicolas Talle
Make a donation via Paypal

About

[Node.js] Prettify the details of the errors in the console

Resources

License

Stars

Watchers

Forks

Packages

No packages published