koajs / onerror

an error handler for koa, hack ctx.onerror
MIT License
140 stars 20 forks source link

emit error to app.error event listenter #32

Closed kwoktung closed 6 years ago

kwoktung commented 6 years ago

https://github.com/koajs/onerror/blob/master/index.js#L50

if emit error to app.error event listenter, error will both handled by ctx.onerror and app.on('error');

Is that redundant??

dead-horse commented 6 years ago

can u give an example to help we understand what's the situation actually here?