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

View file

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