diff --git a/lib/application.js b/lib/application.js index 0f0f3c7..cda045c 100644 --- a/lib/application.js +++ b/lib/application.js @@ -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. *