add app.error(fn). Closes #4

This commit is contained in:
TJ Holowaychuk 2013-08-22 18:47:07 -07:00
parent d2713418cc
commit 3439437c18

View file

@ -139,6 +139,17 @@ app.callback = function(){
} }
}; };
/**
* Set the application-level error handling `fn`.
*
* @param {Function} fn
* @api public
*/
app.error = function(fn){
this.onerror = fn;
};
/** /**
* Default error handler. * Default error handler.
* *