fix app-level error delegation, always delgate

This commit is contained in:
TJ Holowaychuk 2013-08-27 19:42:45 -07:00
parent b047405cc5
commit eb41a90b80
1 changed files with 3 additions and 1 deletions

View File

@ -562,10 +562,12 @@ module.exports = {
*/ */
onerror: function(err){ onerror: function(err){
this.app.onerror(err);
// nothing we can do here other // nothing we can do here other
// than delegate to the app-level // than delegate to the app-level
// handler and log. // handler and log.
if (this.headerSent) return this.app.onerror(err); if (this.headerSent) return;
// err.status support // err.status support
if (err.status) { if (err.status) {