friendly-error
Show uncaught errors friendly in Node.js.
Usage
npm install --save friendly-error
Then add a line at the beginning of your entry file:
That's it.
It use Google, so make sure you have network access to Google. StackOverflow's search API seems not working as expected.
Configuration
Proxy
friendly-error
support HTTP, HTTPS and SOCKS5 proxy.
// HTTP proxy// Just replace 'http://' with 'https://' to use HTTPS proxy proxy: 'http://localhost:8080' // SOCKS5 proxy proxy: 'socks5://localhost:1080'
Colors
If you don't like default colors, you could change it easily.
Default configuration is as follows:
errorMessage: chalkred // Error message errorStack: chalkreset // Error stack breakPoint: chalkbgWhiteblack // Break point where error happens answer: chalkyellow // Best answer from stackoverflow link: chalkcyanunderline // Links
Visit chalk for more information.
License
MIT