{"action":"created","comment":{"url":"https://api.github.com/repos/plaid/async-problem/pulls/comments/42071391","id":42071391,"diff_hunk":"@@ -29,8 +29,14 @@ const walk = bluebird.coroutine(function*(dir) {\n \n const main = () => {\n   walk(process.argv[2])\n-    .catch(s => process.stderr.write(s))\n-    .then(s => process.stdout.write(s));\n+  .then(data => {\n+          process.stdout.write(data);\n+          process.exit(0);\n+        },\n+        err => {\n+          process.stderr.write(String(err) + '\\n');\n+          process.exit(1);\n+        });","path":"coroutines-bluebird.js","position":13,"original_position":13,"commit_id":"5f27139ee3cbba56de690279a5ab5a9dadb683c9","original_commit_id":"5f27139ee3cbba56de690279a5ab5a9dadb683c9","user":{"login":"davidchambers","id":210406,"avatar_url":"https://avatars.githubusercontent.com/u/210406?v=3","gravatar_id":"","url":"https://api.github.com/users/davidchambers","html_url":"https://github.com/davidchambers","followers_url":"https://api.github.com/users/davidchambers/followers","following_url":"https://api.github.com/users/davidchambers/following{/other_user}","gists_url":"https://api.github.com/users/davidchambers/gists{/gist_id}","starred_url":"https://api.github.com/users/davidchambers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidchambers/subscriptions","organizations_url":"https://api.github.com/users/davidchambers/orgs","repos_url":"https://api.github.com/users/davidchambers/repos","events_url":"https://api.github.com/users/davidchambers/events{/privacy}","received_events_url":"https://api.github.com/users/davidchambers/received_events","type":"User","site_admin":false},"body":"The success handler should not throw in this case.\r\n\r\nProviding two functions to `.then` highlights a similarity between Promise and Task.\r\n","created_at":"2015-10-15T00:24:21Z","updated_at":"2015-10-15T00:24:21Z","html_url":"https://github.com/plaid/async-problem/pull/14#discussion_r42071391","pull_request_url":"https://api.github.com/repos/plaid/async-problem/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/plaid/async-problem/pulls/comments/42071391"},"html":{"href":"https://github.com/plaid/async-problem/pull/14#discussion_r42071391"},"pull_request":{"href":"https://api.github.com/repos/plaid/async-problem/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/plaid/async-problem/pulls/14","id":47476553,"html_url":"https://github.com/plaid/async-problem/pull/14","diff_url":"https://github.com/plaid/async-problem/pull/14.diff","patch_url":"https://github.com/plaid/async-problem/pull/14.patch","issue_url":"https://api.github.com/repos/plaid/async-problem/issues/14","number":14,"state":"open","locked":false,"title":"handle errors consistently","user":{"login":"davidchambers","id":210406,"avatar_url":"https://avatars.githubusercontent.com/u/210406?v=3","gravatar_id":"","url":"https://api.github.com/users/davidchambers","html_url":"https://github.com/davidchambers","followers_url":"https://api.github.com/users/davidchambers/followers","following_url":"https://api.github.com/users/davidchambers/following{/other_user}","gists_url":"https://api.github.com/users/davidchambers/gists{/gist_id}","starred_url":"https://api.github.com/users/davidchambers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidchambers/subscriptions","organizations_url":"https://api.github.com/users/davidchambers/orgs","repos_url":"https://api.github.com/users/davidchambers/repos","events_url":"https://api.github.com/users/davidchambers/events{/privacy}","received_events_url":"https://api.github.com/users/davidchambers/received_events","type":"User","site_admin":false},"body":"Closes #13\r\n\r\nThanks for this suggestion, @raine! Handling the error cases makes the examples more realistic.\r\n\r\nInterestingly, __await.js__ loses any appeal it may once have had.\r\n","created_at":"2015-10-12T23:44:04Z","updated_at":"2015-10-15T00:24:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f0f11af09cc2d47fa7f2345a62fee6d9fb8eaa18","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/plaid/async-problem/pulls/14/commits","review_comments_url":"https://api.github.com/repos/plaid/async-problem/pulls/14/comments","review_comment_url":"https://api.github.com/repos/plaid/async-problem/pulls/comments{/number}","comments_url":"https://api.github.com/repos/plaid/async-problem/issues/14/comments","statuses_url":"https://api.github.com/repos/plaid/async-problem/statuses/5f27139ee3cbba56de690279a5ab5a9dadb683c9","head":{"label":"plaid:dc-error-handling","ref":"dc-error-handling","sha":"5f27139ee3cbba56de690279a5ab5a9dadb683c9","user":{"login":"plaid","id":3579888,"avatar_url":"https://avatars.githubusercontent.com/u/3579888?v=3","gravatar_id":"","url":"https://api.github.com/users/plaid","html_url":"https://github.com/plaid","followers_url":"https://api.github.com/users/plaid/followers","following_url":"https://api.github.com/users/plaid/following{/other_user}","gists_url":"https://api.github.com/users/plaid/gists{/gist_id}","starred_url":"https://api.github.com/users/plaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plaid/subscriptions","organizations_url":"https://api.github.com/users/plaid/orgs","repos_url":"https://api.github.com/users/plaid/repos","events_url":"https://api.github.com/users/plaid/events{/privacy}","received_events_url":"https://api.github.com/users/plaid/received_events","type":"Organization","site_admin":false},"repo":{"id":38137579,"name":"async-problem","full_name":"plaid/async-problem","owner":{"login":"plaid","id":3579888,"avatar_url":"https://avatars.githubusercontent.com/u/3579888?v=3","gravatar_id":"","url":"https://api.github.com/users/plaid","html_url":"https://github.com/plaid","followers_url":"https://api.github.com/users/plaid/followers","following_url":"https://api.github.com/users/plaid/following{/other_user}","gists_url":"https://api.github.com/users/plaid/gists{/gist_id}","starred_url":"https://api.github.com/users/plaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plaid/subscriptions","organizations_url":"https://api.github.com/users/plaid/orgs","repos_url":"https://api.github.com/users/plaid/repos","events_url":"https://api.github.com/users/plaid/events{/privacy}","received_events_url":"https://api.github.com/users/plaid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/plaid/async-problem","description":":twisted_rightwards_arrows: Solutions and non-solutions to JavaScript's async problem","fork":false,"url":"https://api.github.com/repos/plaid/async-problem","forks_url":"https://api.github.com/repos/plaid/async-problem/forks","keys_url":"https://api.github.com/repos/plaid/async-problem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plaid/async-problem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plaid/async-problem/teams","hooks_url":"https://api.github.com/repos/plaid/async-problem/hooks","issue_events_url":"https://api.github.com/repos/plaid/async-problem/issues/events{/number}","events_url":"https://api.github.com/repos/plaid/async-problem/events","assignees_url":"https://api.github.com/repos/plaid/async-problem/assignees{/user}","branches_url":"https://api.github.com/repos/plaid/async-problem/branches{/branch}","tags_url":"https://api.github.com/repos/plaid/async-problem/tags","blobs_url":"https://api.github.com/repos/plaid/async-problem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plaid/async-problem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plaid/async-problem/git/refs{/sha}","trees_url":"https://api.github.com/repos/plaid/async-problem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plaid/async-problem/statuses/{sha}","languages_url":"https://api.github.com/repos/plaid/async-problem/languages","stargazers_url":"https://api.github.com/repos/plaid/async-problem/stargazers","contributors_url":"https://api.github.com/repos/plaid/async-problem/contributors","subscribers_url":"https://api.github.com/repos/plaid/async-problem/subscribers","subscription_url":"https://api.github.com/repos/plaid/async-problem/subscription","commits_url":"https://api.github.com/repos/plaid/async-problem/commits{/sha}","git_commits_url":"https://api.github.com/repos/plaid/async-problem/git/commits{/sha}","comments_url":"https://api.github.com/repos/plaid/async-problem/comments{/number}","issue_comment_url":"https://api.github.com/repos/plaid/async-problem/issues/comments{/number}","contents_url":"https://api.github.com/repos/plaid/async-problem/contents/{+path}","compare_url":"https://api.github.com/repos/plaid/async-problem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plaid/async-problem/merges","archive_url":"https://api.github.com/repos/plaid/async-problem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plaid/async-problem/downloads","issues_url":"https://api.github.com/repos/plaid/async-problem/issues{/number}","pulls_url":"https://api.github.com/repos/plaid/async-problem/pulls{/number}","milestones_url":"https://api.github.com/repos/plaid/async-problem/milestones{/number}","notifications_url":"https://api.github.com/repos/plaid/async-problem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plaid/async-problem/labels{/name}","releases_url":"https://api.github.com/repos/plaid/async-problem/releases{/id}","created_at":"2015-06-26T22:45:47Z","updated_at":"2015-10-12T19:42:26Z","pushed_at":"2015-10-14T01:19:47Z","git_url":"git://github.com/plaid/async-problem.git","ssh_url":"git@github.com:plaid/async-problem.git","clone_url":"https://github.com/plaid/async-problem.git","svn_url":"https://github.com/plaid/async-problem","homepage":"","size":290,"stargazers_count":26,"watchers_count":26,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":4,"forks":7,"open_issues":4,"watchers":26,"default_branch":"master"}},"base":{"label":"plaid:master","ref":"master","sha":"2e6842e933aeb564624888364cca7699becad5de","user":{"login":"plaid","id":3579888,"avatar_url":"https://avatars.githubusercontent.com/u/3579888?v=3","gravatar_id":"","url":"https://api.github.com/users/plaid","html_url":"https://github.com/plaid","followers_url":"https://api.github.com/users/plaid/followers","following_url":"https://api.github.com/users/plaid/following{/other_user}","gists_url":"https://api.github.com/users/plaid/gists{/gist_id}","starred_url":"https://api.github.com/users/plaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plaid/subscriptions","organizations_url":"https://api.github.com/users/plaid/orgs","repos_url":"https://api.github.com/users/plaid/repos","events_url":"https://api.github.com/users/plaid/events{/privacy}","received_events_url":"https://api.github.com/users/plaid/received_events","type":"Organization","site_admin":false},"repo":{"id":38137579,"name":"async-problem","full_name":"plaid/async-problem","owner":{"login":"plaid","id":3579888,"avatar_url":"https://avatars.githubusercontent.com/u/3579888?v=3","gravatar_id":"","url":"https://api.github.com/users/plaid","html_url":"https://github.com/plaid","followers_url":"https://api.github.com/users/plaid/followers","following_url":"https://api.github.com/users/plaid/following{/other_user}","gists_url":"https://api.github.com/users/plaid/gists{/gist_id}","starred_url":"https://api.github.com/users/plaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plaid/subscriptions","organizations_url":"https://api.github.com/users/plaid/orgs","repos_url":"https://api.github.com/users/plaid/repos","events_url":"https://api.github.com/users/plaid/events{/privacy}","received_events_url":"https://api.github.com/users/plaid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/plaid/async-problem","description":":twisted_rightwards_arrows: Solutions and non-solutions to JavaScript's async problem","fork":false,"url":"https://api.github.com/repos/plaid/async-problem","forks_url":"https://api.github.com/repos/plaid/async-problem/forks","keys_url":"https://api.github.com/repos/plaid/async-problem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plaid/async-problem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plaid/async-problem/teams","hooks_url":"https://api.github.com/repos/plaid/async-problem/hooks","issue_events_url":"https://api.github.com/repos/plaid/async-problem/issues/events{/number}","events_url":"https://api.github.com/repos/plaid/async-problem/events","assignees_url":"https://api.github.com/repos/plaid/async-problem/assignees{/user}","branches_url":"https://api.github.com/repos/plaid/async-problem/branches{/branch}","tags_url":"https://api.github.com/repos/plaid/async-problem/tags","blobs_url":"https://api.github.com/repos/plaid/async-problem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plaid/async-problem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plaid/async-problem/git/refs{/sha}","trees_url":"https://api.github.com/repos/plaid/async-problem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plaid/async-problem/statuses/{sha}","languages_url":"https://api.github.com/repos/plaid/async-problem/languages","stargazers_url":"https://api.github.com/repos/plaid/async-problem/stargazers","contributors_url":"https://api.github.com/repos/plaid/async-problem/contributors","subscribers_url":"https://api.github.com/repos/plaid/async-problem/subscribers","subscription_url":"https://api.github.com/repos/plaid/async-problem/subscription","commits_url":"https://api.github.com/repos/plaid/async-problem/commits{/sha}","git_commits_url":"https://api.github.com/repos/plaid/async-problem/git/commits{/sha}","comments_url":"https://api.github.com/repos/plaid/async-problem/comments{/number}","issue_comment_url":"https://api.github.com/repos/plaid/async-problem/issues/comments{/number}","contents_url":"https://api.github.com/repos/plaid/async-problem/contents/{+path}","compare_url":"https://api.github.com/repos/plaid/async-problem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plaid/async-problem/merges","archive_url":"https://api.github.com/repos/plaid/async-problem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plaid/async-problem/downloads","issues_url":"https://api.github.com/repos/plaid/async-problem/issues{/number}","pulls_url":"https://api.github.com/repos/plaid/async-problem/pulls{/number}","milestones_url":"https://api.github.com/repos/plaid/async-problem/milestones{/number}","notifications_url":"https://api.github.com/repos/plaid/async-problem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plaid/async-problem/labels{/name}","releases_url":"https://api.github.com/repos/plaid/async-problem/releases{/id}","created_at":"2015-06-26T22:45:47Z","updated_at":"2015-10-12T19:42:26Z","pushed_at":"2015-10-14T01:19:47Z","git_url":"git://github.com/plaid/async-problem.git","ssh_url":"git@github.com:plaid/async-problem.git","clone_url":"https://github.com/plaid/async-problem.git","svn_url":"https://github.com/plaid/async-problem","homepage":"","size":290,"stargazers_count":26,"watchers_count":26,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":4,"forks":7,"open_issues":4,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/plaid/async-problem/pulls/14"},"html":{"href":"https://github.com/plaid/async-problem/pull/14"},"issue":{"href":"https://api.github.com/repos/plaid/async-problem/issues/14"},"comments":{"href":"https://api.github.com/repos/plaid/async-problem/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/plaid/async-problem/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/plaid/async-problem/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/plaid/async-problem/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/plaid/async-problem/statuses/5f27139ee3cbba56de690279a5ab5a9dadb683c9"}}}}