{"action":"created","comment":{"url":"https://api.github.com/repos/genome/genome/pulls/comments/29951957","id":29951957,"diff_hunk":"@@ -52,12 +53,23 @@ sub execute {\n     for my $build (@builds) {\n         $self->_total_command_count($self->_total_command_count + 1);\n         my $transaction = UR::Context::Transaction->begin();\n-        my $successful = eval { $build->abandon($self->header_text, $self->body_text) };\n-        if ($successful and $transaction->commit) {\n-            $self->status_message( \"Successfully abandoned build (\" . $build->__display_name__ . \").\" );\n-        }\n-        else {\n-            $self->append_error($build->__display_name__, \"Failed to abandon build: $@.\");\n+\n+        my $successful = try {\n+            $build->abandon($self->header_text, $self->body_text);\n+        } catch {\n+            $self->append_error($build->__display_name__, \"Failed to abandon build: $_.\");\n+            $transaction->rollback;\n+        };\n+\n+        if ($successful) {\n+            if ($transaction->commit) {\n+                $self->successfully_abandoned_callback($build);\n+            } else {\n+                $self->append_error($build->__display_name__, \"Failed to commit transaction to abandon build\");\n+                $transaction->rollback;\n+            }\n+        } else {\n+            $self->append_error($build->__display_name__, \"Failed to abandon build for some reason.\");\n             $transaction->rollback;","path":"lib/perl/Genome/Model/Build/Command/Abandon.pm","position":35,"original_position":35,"commit_id":"3181d85347d57e187c7936e988bf773b16d3d3e9","original_commit_id":"3181d85347d57e187c7936e988bf773b16d3d3e9","user":{"login":"nnutter","id":207011,"avatar_url":"https://avatars.githubusercontent.com/u/207011?v=3","gravatar_id":"","url":"https://api.github.com/users/nnutter","html_url":"https://github.com/nnutter","followers_url":"https://api.github.com/users/nnutter/followers","following_url":"https://api.github.com/users/nnutter/following{/other_user}","gists_url":"https://api.github.com/users/nnutter/gists{/gist_id}","starred_url":"https://api.github.com/users/nnutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nnutter/subscriptions","organizations_url":"https://api.github.com/users/nnutter/orgs","repos_url":"https://api.github.com/users/nnutter/repos","events_url":"https://api.github.com/users/nnutter/events{/privacy}","received_events_url":"https://api.github.com/users/nnutter/received_events","type":"User","site_admin":false},"body":"I think this is a second call to `rollback()` in the case where `abandon()` dies which I believe will cause an exception.  I think it would also append two errors in that case.","created_at":"2015-05-08T16:01:39Z","updated_at":"2015-05-08T16:01:39Z","html_url":"https://github.com/genome/genome/pull/724#discussion_r29951957","pull_request_url":"https://api.github.com/repos/genome/genome/pulls/724","_links":{"self":{"href":"https://api.github.com/repos/genome/genome/pulls/comments/29951957"},"html":{"href":"https://github.com/genome/genome/pull/724#discussion_r29951957"},"pull_request":{"href":"https://api.github.com/repos/genome/genome/pulls/724"}}},"pull_request":{"url":"https://api.github.com/repos/genome/genome/pulls/724","id":34967003,"html_url":"https://github.com/genome/genome/pull/724","diff_url":"https://github.com/genome/genome/pull/724.diff","patch_url":"https://github.com/genome/genome/pull/724.patch","issue_url":"https://api.github.com/repos/genome/genome/issues/724","number":724,"state":"open","locked":false,"title":"Ensure that errors are able to be displayed in G::M::B::Abandon","user":{"login":"davidlmorton","id":650482,"avatar_url":"https://avatars.githubusercontent.com/u/650482?v=3","gravatar_id":"","url":"https://api.github.com/users/davidlmorton","html_url":"https://github.com/davidlmorton","followers_url":"https://api.github.com/users/davidlmorton/followers","following_url":"https://api.github.com/users/davidlmorton/following{/other_user}","gists_url":"https://api.github.com/users/davidlmorton/gists{/gist_id}","starred_url":"https://api.github.com/users/davidlmorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidlmorton/subscriptions","organizations_url":"https://api.github.com/users/davidlmorton/orgs","repos_url":"https://api.github.com/users/davidlmorton/repos","events_url":"https://api.github.com/users/davidlmorton/events{/privacy}","received_events_url":"https://api.github.com/users/davidlmorton/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-07T23:01:06Z","updated_at":"2015-05-08T16:01:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9af07d3f5c915fb335eff7e122fd318f55c3d4a8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/genome/genome/pulls/724/commits","review_comments_url":"https://api.github.com/repos/genome/genome/pulls/724/comments","review_comment_url":"https://api.github.com/repos/genome/genome/pulls/comments{/number}","comments_url":"https://api.github.com/repos/genome/genome/issues/724/comments","statuses_url":"https://api.github.com/repos/genome/genome/statuses/3181d85347d57e187c7936e988bf773b16d3d3e9","head":{"label":"davidlmorton:abandonment_issues","ref":"abandonment_issues","sha":"3181d85347d57e187c7936e988bf773b16d3d3e9","user":{"login":"davidlmorton","id":650482,"avatar_url":"https://avatars.githubusercontent.com/u/650482?v=3","gravatar_id":"","url":"https://api.github.com/users/davidlmorton","html_url":"https://github.com/davidlmorton","followers_url":"https://api.github.com/users/davidlmorton/followers","following_url":"https://api.github.com/users/davidlmorton/following{/other_user}","gists_url":"https://api.github.com/users/davidlmorton/gists{/gist_id}","starred_url":"https://api.github.com/users/davidlmorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidlmorton/subscriptions","organizations_url":"https://api.github.com/users/davidlmorton/orgs","repos_url":"https://api.github.com/users/davidlmorton/repos","events_url":"https://api.github.com/users/davidlmorton/events{/privacy}","received_events_url":"https://api.github.com/users/davidlmorton/received_events","type":"User","site_admin":false},"repo":{"id":23687841,"name":"genome","full_name":"davidlmorton/genome","owner":{"login":"davidlmorton","id":650482,"avatar_url":"https://avatars.githubusercontent.com/u/650482?v=3","gravatar_id":"","url":"https://api.github.com/users/davidlmorton","html_url":"https://github.com/davidlmorton","followers_url":"https://api.github.com/users/davidlmorton/followers","following_url":"https://api.github.com/users/davidlmorton/following{/other_user}","gists_url":"https://api.github.com/users/davidlmorton/gists{/gist_id}","starred_url":"https://api.github.com/users/davidlmorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidlmorton/subscriptions","organizations_url":"https://api.github.com/users/davidlmorton/orgs","repos_url":"https://api.github.com/users/davidlmorton/repos","events_url":"https://api.github.com/users/davidlmorton/events{/privacy}","received_events_url":"https://api.github.com/users/davidlmorton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidlmorton/genome","description":"","fork":true,"url":"https://api.github.com/repos/davidlmorton/genome","forks_url":"https://api.github.com/repos/davidlmorton/genome/forks","keys_url":"https://api.github.com/repos/davidlmorton/genome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidlmorton/genome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidlmorton/genome/teams","hooks_url":"https://api.github.com/repos/davidlmorton/genome/hooks","issue_events_url":"https://api.github.com/repos/davidlmorton/genome/issues/events{/number}","events_url":"https://api.github.com/repos/davidlmorton/genome/events","assignees_url":"https://api.github.com/repos/davidlmorton/genome/assignees{/user}","branches_url":"https://api.github.com/repos/davidlmorton/genome/branches{/branch}","tags_url":"https://api.github.com/repos/davidlmorton/genome/tags","blobs_url":"https://api.github.com/repos/davidlmorton/genome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidlmorton/genome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidlmorton/genome/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidlmorton/genome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidlmorton/genome/statuses/{sha}","languages_url":"https://api.github.com/repos/davidlmorton/genome/languages","stargazers_url":"https://api.github.com/repos/davidlmorton/genome/stargazers","contributors_url":"https://api.github.com/repos/davidlmorton/genome/contributors","subscribers_url":"https://api.github.com/repos/davidlmorton/genome/subscribers","subscription_url":"https://api.github.com/repos/davidlmorton/genome/subscription","commits_url":"https://api.github.com/repos/davidlmorton/genome/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidlmorton/genome/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidlmorton/genome/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidlmorton/genome/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidlmorton/genome/contents/{+path}","compare_url":"https://api.github.com/repos/davidlmorton/genome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidlmorton/genome/merges","archive_url":"https://api.github.com/repos/davidlmorton/genome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidlmorton/genome/downloads","issues_url":"https://api.github.com/repos/davidlmorton/genome/issues{/number}","pulls_url":"https://api.github.com/repos/davidlmorton/genome/pulls{/number}","milestones_url":"https://api.github.com/repos/davidlmorton/genome/milestones{/number}","notifications_url":"https://api.github.com/repos/davidlmorton/genome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidlmorton/genome/labels{/name}","releases_url":"https://api.github.com/repos/davidlmorton/genome/releases{/id}","created_at":"2014-09-05T02:43:50Z","updated_at":"2015-04-27T16:40:31Z","pushed_at":"2015-05-07T22:59:58Z","git_url":"git://github.com/davidlmorton/genome.git","ssh_url":"git@github.com:davidlmorton/genome.git","clone_url":"https://github.com/davidlmorton/genome.git","svn_url":"https://github.com/davidlmorton/genome","homepage":"","size":117345,"stargazers_count":0,"watchers_count":0,"language":"Perl","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"genome:master","ref":"master","sha":"3ae259c112c994feb31b0333406583cd1eefa0d9","user":{"login":"genome","id":318108,"avatar_url":"https://avatars.githubusercontent.com/u/318108?v=3","gravatar_id":"","url":"https://api.github.com/users/genome","html_url":"https://github.com/genome","followers_url":"https://api.github.com/users/genome/followers","following_url":"https://api.github.com/users/genome/following{/other_user}","gists_url":"https://api.github.com/users/genome/gists{/gist_id}","starred_url":"https://api.github.com/users/genome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genome/subscriptions","organizations_url":"https://api.github.com/users/genome/orgs","repos_url":"https://api.github.com/users/genome/repos","events_url":"https://api.github.com/users/genome/events{/privacy}","received_events_url":"https://api.github.com/users/genome/received_events","type":"Organization","site_admin":false},"repo":{"id":23442737,"name":"genome","full_name":"genome/genome","owner":{"login":"genome","id":318108,"avatar_url":"https://avatars.githubusercontent.com/u/318108?v=3","gravatar_id":"","url":"https://api.github.com/users/genome","html_url":"https://github.com/genome","followers_url":"https://api.github.com/users/genome/followers","following_url":"https://api.github.com/users/genome/following{/other_user}","gists_url":"https://api.github.com/users/genome/gists{/gist_id}","starred_url":"https://api.github.com/users/genome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genome/subscriptions","organizations_url":"https://api.github.com/users/genome/orgs","repos_url":"https://api.github.com/users/genome/repos","events_url":"https://api.github.com/users/genome/events{/privacy}","received_events_url":"https://api.github.com/users/genome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/genome/genome","description":"Core modules used by the GMS","fork":false,"url":"https://api.github.com/repos/genome/genome","forks_url":"https://api.github.com/repos/genome/genome/forks","keys_url":"https://api.github.com/repos/genome/genome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/genome/genome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/genome/genome/teams","hooks_url":"https://api.github.com/repos/genome/genome/hooks","issue_events_url":"https://api.github.com/repos/genome/genome/issues/events{/number}","events_url":"https://api.github.com/repos/genome/genome/events","assignees_url":"https://api.github.com/repos/genome/genome/assignees{/user}","branches_url":"https://api.github.com/repos/genome/genome/branches{/branch}","tags_url":"https://api.github.com/repos/genome/genome/tags","blobs_url":"https://api.github.com/repos/genome/genome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/genome/genome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/genome/genome/git/refs{/sha}","trees_url":"https://api.github.com/repos/genome/genome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/genome/genome/statuses/{sha}","languages_url":"https://api.github.com/repos/genome/genome/languages","stargazers_url":"https://api.github.com/repos/genome/genome/stargazers","contributors_url":"https://api.github.com/repos/genome/genome/contributors","subscribers_url":"https://api.github.com/repos/genome/genome/subscribers","subscription_url":"https://api.github.com/repos/genome/genome/subscription","commits_url":"https://api.github.com/repos/genome/genome/commits{/sha}","git_commits_url":"https://api.github.com/repos/genome/genome/git/commits{/sha}","comments_url":"https://api.github.com/repos/genome/genome/comments{/number}","issue_comment_url":"https://api.github.com/repos/genome/genome/issues/comments{/number}","contents_url":"https://api.github.com/repos/genome/genome/contents/{+path}","compare_url":"https://api.github.com/repos/genome/genome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/genome/genome/merges","archive_url":"https://api.github.com/repos/genome/genome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/genome/genome/downloads","issues_url":"https://api.github.com/repos/genome/genome/issues{/number}","pulls_url":"https://api.github.com/repos/genome/genome/pulls{/number}","milestones_url":"https://api.github.com/repos/genome/genome/milestones{/number}","notifications_url":"https://api.github.com/repos/genome/genome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/genome/genome/labels{/name}","releases_url":"https://api.github.com/repos/genome/genome/releases{/id}","created_at":"2014-08-28T20:59:19Z","updated_at":"2015-05-07T19:06:17Z","pushed_at":"2015-05-08T13:39:38Z","git_url":"git://github.com/genome/genome.git","ssh_url":"git@github.com:genome/genome.git","clone_url":"https://github.com/genome/genome.git","svn_url":"https://github.com/genome/genome","homepage":"","size":171806,"stargazers_count":8,"watchers_count":8,"language":"Perl","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":36,"mirror_url":null,"open_issues_count":12,"forks":36,"open_issues":12,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/genome/genome/pulls/724"},"html":{"href":"https://github.com/genome/genome/pull/724"},"issue":{"href":"https://api.github.com/repos/genome/genome/issues/724"},"comments":{"href":"https://api.github.com/repos/genome/genome/issues/724/comments"},"review_comments":{"href":"https://api.github.com/repos/genome/genome/pulls/724/comments"},"review_comment":{"href":"https://api.github.com/repos/genome/genome/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/genome/genome/pulls/724/commits"},"statuses":{"href":"https://api.github.com/repos/genome/genome/statuses/3181d85347d57e187c7936e988bf773b16d3d3e9"}}}}