Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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

Packages

No packages published
You can’t perform that action at this time.