mini-rest-uncaught
v0.0.17
Published
Simple uncaught exception handler for mini-rest project
Downloads
12
Maintainers
Readme
mini-rest-uncaught
Simple uncaught exception handler for mini-rest
project.
Logs all uncaught exceptions except SyntaxError
(to allow filename, lineno, colno to be shown) and workaround for 'Directory not found' in require-config-all
If you have different needs regarding the functionality, please add a feature request.
Installation
npm install --save mini-rest-uncaught
Usage
var logger = require('mini-rest-logger')();
var uncaught = require('../')({}, logger);
throw new Error('this is uncaught exception');
$ node examples/index.js
2016-03-07T23:30:58.211Z - error: [index] uncaughtException: [Error: this is uncaught exception] Error: this is uncaught exception
at Object.<anonymous> (/home/alykoshin/sync/al-projects/dev/npm/mini-rest-uncaught/examples/index.js:10:7)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
at startup (node.js:139:18)
at node.js:999:3
Credits
Links to package pages:
github.com npmjs.com travis-ci.org coveralls.io inch-ci.org
License
MIT