1.0.0 • Published 11 years ago

connect-error v1.0.0

Weekly downloads
11
License
-
Repository
github
Last release
11 years ago

connect-error

Smoothly pass errors through your connect application.

example

First of all install this module with npm install connect-error.

var connect = require('connect'),
    connectError = require('connect-error');

app = connect()
  .use(connectError())
  .use(function (req, res) {
    // create a correct error object and pass it to our error handler
    res.error('example error');
  })
  .use(function (err, req, res, next) {
    // err is a clean `Error` instance with a `stack` property.
    // application flow will jump directly to this error handler.
  })
  .listen(3000);

todo

  • Add filter support for whenever errors appear (allow airbreak, string manipulation and substitution or other things)
1.0.0

11 years ago

0.0.1

11 years ago