0.0.3 • Published 9 years ago
koa-catch v0.0.3
koa-catch
Catch and re-throw errors via context.throw
Install
npm install koa-catch
Usage
var koa = require('koa');
var koaCatch = require('koa-catch');
var app = koaCatch(koa());
app.use(function *() {
yield this.catch(function *() {
throw new Error();
}, 400, 'Error message');
});