Merge pull request #696 from stigok/stigok-patch-1

Update context.md
This commit is contained in:
Yiyu He 2016-03-25 12:35:56 +08:00
commit 4809f083ac

View file

@ -119,7 +119,7 @@ this.throw('access_denied', { user: user });
koa uses [http-errors](https://github.com/jshttp/http-errors) to create errors. koa uses [http-errors](https://github.com/jshttp/http-errors) to create errors.
### ctx.assert(value, [msg], [status], [properties]) ### ctx.assert(value, [status], [msg], [properties])
Helper method to throw an error similar to `.throw()` Helper method to throw an error similar to `.throw()`
when `!value`. Similar to node's [assert()](http://nodejs.org/api/assert.html) when `!value`. Similar to node's [assert()](http://nodejs.org/api/assert.html)