{"action":"created","issue":{"url":"https://api.github.com/repos/koajs/koa/issues/800","repository_url":"https://api.github.com/repos/koajs/koa","labels_url":"https://api.github.com/repos/koajs/koa/issues/800/labels{/name}","comments_url":"https://api.github.com/repos/koajs/koa/issues/800/comments","events_url":"https://api.github.com/repos/koajs/koa/issues/800/events","html_url":"https://github.com/koajs/koa/pull/800","id":173607361,"number":800,"title":"[breaking change] don't bind onerror to context","user":{"login":"dead-horse","id":985607,"avatar_url":"https://avatars.githubusercontent.com/u/985607?v=3","gravatar_id":"","url":"https://api.github.com/users/dead-horse","html_url":"https://github.com/dead-horse","followers_url":"https://api.github.com/users/dead-horse/followers","following_url":"https://api.github.com/users/dead-horse/following{/other_user}","gists_url":"https://api.github.com/users/dead-horse/gists{/gist_id}","starred_url":"https://api.github.com/users/dead-horse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dead-horse/subscriptions","organizations_url":"https://api.github.com/users/dead-horse/orgs","repos_url":"https://api.github.com/users/dead-horse/repos","events_url":"https://api.github.com/users/dead-horse/events{/privacy}","received_events_url":"https://api.github.com/users/dead-horse/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/koajs/koa/labels/refactor","name":"refactor","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/koajs/koa/milestones/1","html_url":"https://github.com/koajs/koa/milestones/v2.0.0","labels_url":"https://api.github.com/repos/koajs/koa/milestones/1/labels","id":856817,"number":1,"title":"v2.0.0","description":"bout time","creator":{"login":"tj","id":25254,"avatar_url":"https://avatars.githubusercontent.com/u/25254?v=3","gravatar_id":"","url":"https://api.github.com/users/tj","html_url":"https://github.com/tj","followers_url":"https://api.github.com/users/tj/followers","following_url":"https://api.github.com/users/tj/following{/other_user}","gists_url":"https://api.github.com/users/tj/gists{/gist_id}","starred_url":"https://api.github.com/users/tj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tj/subscriptions","organizations_url":"https://api.github.com/users/tj/orgs","repos_url":"https://api.github.com/users/tj/repos","events_url":"https://api.github.com/users/tj/events{/privacy}","received_events_url":"https://api.github.com/users/tj/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":26,"state":"open","created_at":"2014-11-07T02:18:36Z","updated_at":"2016-08-27T17:53:48Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-08-27T17:53:48Z","updated_at":"2016-08-27T17:57:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/koajs/koa/pulls/800","html_url":"https://github.com/koajs/koa/pull/800","diff_url":"https://github.com/koajs/koa/pull/800.diff","patch_url":"https://github.com/koajs/koa/pull/800.patch"},"body":"1. People should understand javascript's `this`, and it's easy to handle with arrow functions just like `stream.on('error', err => this.onerror(err));`.\r\n2. We already handled all the errors automatically in koa, 99.9% people won't use `this.onerror` in app level. We have written 100+ apps and middlewares in production, no one used `this.onerror`.\r\n3. It's has higher performance(~10% increase).\r\n\r\n- before\r\n\r\n```\r\n  1 middleware\r\n  9134.88\r\n\r\n  5 middleware\r\n  9209.45\r\n\r\n  10 middleware\r\n  8261.05\r\n\r\n  15 middleware\r\n  8873.18\r\n\r\n  20 middleware\r\n  8957.63\r\n\r\n  30 middleware\r\n  9036.78\r\n\r\n  50 middleware\r\n  8543.95\r\n\r\n  100 middleware\r\n  8088.44\r\n```\r\n\r\n- after\r\n\r\n```\r\n  1 middleware\r\n  9939.28\r\n\r\n  5 middleware\r\n  9806.14\r\n\r\n  10 middleware\r\n  9636.60\r\n\r\n  15 middleware\r\n  9603.57\r\n\r\n  20 middleware\r\n  9664.59\r\n\r\n  30 middleware\r\n  9695.19\r\n\r\n  50 middleware\r\n  9220.74\r\n\r\n  100 middleware\r\n  8498.86\r\n```"},"comment":{"url":"https://api.github.com/repos/koajs/koa/issues/comments/242931398","html_url":"https://github.com/koajs/koa/pull/800#issuecomment-242931398","issue_url":"https://api.github.com/repos/koajs/koa/issues/800","id":242931398,"user":{"login":"dead-horse","id":985607,"avatar_url":"https://avatars.githubusercontent.com/u/985607?v=3","gravatar_id":"","url":"https://api.github.com/users/dead-horse","html_url":"https://github.com/dead-horse","followers_url":"https://api.github.com/users/dead-horse/followers","following_url":"https://api.github.com/users/dead-horse/following{/other_user}","gists_url":"https://api.github.com/users/dead-horse/gists{/gist_id}","starred_url":"https://api.github.com/users/dead-horse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dead-horse/subscriptions","organizations_url":"https://api.github.com/users/dead-horse/orgs","repos_url":"https://api.github.com/users/dead-horse/repos","events_url":"https://api.github.com/users/dead-horse/events{/privacy}","received_events_url":"https://api.github.com/users/dead-horse/received_events","type":"User","site_admin":false},"created_at":"2016-08-27T17:57:45Z","updated_at":"2016-08-27T17:57:45Z","body":"@koajs any thoughts?"}}
{"actor":{"display_login":"dead-horse"}}