Skip to content

Commit 1d1698e

Browse files
committedMar 13, 2016
Update error handling doc to use promises+async
1 parent 882ea7e commit 1d1698e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎docs/error-handling.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
this example prepends all error messages with "Error: "
77

88
```js
9-
app.use(function*(next){
9+
app.use(async (ctx, next) => {
1010
try {
11-
yield next;
11+
await next();
1212
} catch (error) {
1313
error.message = 'Error: ' + error.message;
1414
throw error;

0 commit comments

Comments
 (0)
Please sign in to comment.