node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »



A module for smarter and faster debugging / exception handling node.js projects.

Alpha Tester Instructions

Right now, all this module does is capture any unhandled exceptions you have in the wild and log them to a remote database. My goal is to collect as much data about common exceptions and error states as possible so I can try to find ways to shorten the time between bug and solution. As I collect data, I'll be pushing updates, which I will ask you to install from time to time.

For being an alpha tester, you'll earn something cool down the road if this works out well enough.


Install the library via npm and save it to your package json:

$ npm install errorhandlr --save

Basic Usage

Once you have the library installed, engage the logger with the following snippet at the top of any file that you run directly:

var ErrorHandlr = require('errorhandlr').engage();

Now proceed to code as normal. Any uncaught exceptions you encounter will be logged.

Express Usage

To use the module with express, require the module and engage it as you normally would:

var ErrorHandlr = require('errorhandlr').engage();

Now, add the following handler below your route definitions:

Express 3.x:


Express 2.x:



If you ever need to disengage the script, you can do so with the following code: