add app.error(fn). Closes #4
This commit is contained in:
parent
d2713418cc
commit
3439437c18
1 changed files with 11 additions and 0 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue