errorhandlr

0.0.4 • Public • Published

errorhandlr-node

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

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:

app.use(ErrorHandlr.express())

Express 2.x:

app.error(ErrorHandlr.express())

Advanced

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

ErrorHandlr.disengage();

Readme

Keywords

none

Package Sidebar

Install

npm i errorhandlr

Weekly Downloads

1

Version

0.0.4

License

MIT

Last publish

Collaborators

  • theycallmeswift