pass context to errors
errors are kind of useless without the context
This commit is contained in:
parent
9c904ebf23
commit
a5208f5ce6
1 changed files with 3 additions and 4 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module dependencies.
|
* Module dependencies.
|
||||||
*/
|
*/
|
||||||
|
@ -592,12 +591,12 @@ module.exports = {
|
||||||
// handler and log.
|
// handler and log.
|
||||||
if (this.headerSent) {
|
if (this.headerSent) {
|
||||||
err.headerSent = true;
|
err.headerSent = true;
|
||||||
this.app.emit('error', err);
|
this.app.emit('error', err, this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// delegate
|
// delegate
|
||||||
this.app.emit('error', err);
|
this.app.emit('error', err, this);
|
||||||
|
|
||||||
// err.status support
|
// err.status support
|
||||||
if (err.status) {
|
if (err.status) {
|
||||||
|
|
Loading…
Reference in a new issue