{"action":"created","comment":{"url":"https://api.github.com/repos/tessel/t2-cli/pulls/comments/45097879","id":45097879,"diff_hunk":"@@ -287,18 +287,27 @@ module.exports.closeSuccessfulCommand = function() {\n };\n \n // Allow options to be partially applied\n-module.exports.closeFailedCommand = function(opts, err) {\n-  if (!err) {\n-    err = opts;\n-    opts = {};\n-  }\n-  if (err instanceof Error) {\n-    throw err;\n+module.exports.closeFailedCommand = function(opts, error) {\n+\n+  if (opts) {","path":"bin/tessel-2.js","position":13,"original_position":13,"commit_id":"ad6f2bd9aaa002bb3abfce0b45b9a3514cb44275","original_commit_id":"ad6f2bd9aaa002bb3abfce0b45b9a3514cb44275","user":{"login":"rwaldron","id":27985,"avatar_url":"https://avatars.githubusercontent.com/u/27985?v=3","gravatar_id":"","url":"https://api.github.com/users/rwaldron","html_url":"https://github.com/rwaldron","followers_url":"https://api.github.com/users/rwaldron/followers","following_url":"https://api.github.com/users/rwaldron/following{/other_user}","gists_url":"https://api.github.com/users/rwaldron/gists{/gist_id}","starred_url":"https://api.github.com/users/rwaldron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwaldron/subscriptions","organizations_url":"https://api.github.com/users/rwaldron/orgs","repos_url":"https://api.github.com/users/rwaldron/repos","events_url":"https://api.github.com/users/rwaldron/events{/privacy}","received_events_url":"https://api.github.com/users/rwaldron/received_events","type":"User","site_admin":false},"body":"I found no occurrences where `closeFailedCommand` is called with nothing, so I'm re-working this. I was also able to clean up the syntax error handling from https://github.com/tessel/t2-cli/commit/0726002569bb3d043e0b22edb2a5ac51e86b304c","created_at":"2015-11-17T18:24:40Z","updated_at":"2015-11-17T18:24:40Z","html_url":"https://github.com/tessel/t2-cli/pull/450#discussion_r45097879","pull_request_url":"https://api.github.com/repos/tessel/t2-cli/pulls/450","_links":{"self":{"href":"https://api.github.com/repos/tessel/t2-cli/pulls/comments/45097879"},"html":{"href":"https://github.com/tessel/t2-cli/pull/450#discussion_r45097879"},"pull_request":{"href":"https://api.github.com/repos/tessel/t2-cli/pulls/450"}}},"pull_request":{"url":"https://api.github.com/repos/tessel/t2-cli/pulls/450","id":50885122,"html_url":"https://github.com/tessel/t2-cli/pull/450","diff_url":"https://github.com/tessel/t2-cli/pull/450.diff","patch_url":"https://github.com/tessel/t2-cli/pull/450.patch","issue_url":"https://api.github.com/repos/tessel/t2-cli/issues/450","number":450,"state":"open","locked":false,"title":"Instead of rethrowing errors, log them. Fixes gh-449","user":{"login":"rwaldron","id":27985,"avatar_url":"https://avatars.githubusercontent.com/u/27985?v=3","gravatar_id":"","url":"https://api.github.com/users/rwaldron","html_url":"https://github.com/rwaldron","followers_url":"https://api.github.com/users/rwaldron/followers","following_url":"https://api.github.com/users/rwaldron/following{/other_user}","gists_url":"https://api.github.com/users/rwaldron/gists{/gist_id}","starred_url":"https://api.github.com/users/rwaldron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwaldron/subscriptions","organizations_url":"https://api.github.com/users/rwaldron/orgs","repos_url":"https://api.github.com/users/rwaldron/repos","events_url":"https://api.github.com/users/rwaldron/events{/privacy}","received_events_url":"https://api.github.com/users/rwaldron/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-16T23:55:15Z","updated_at":"2015-11-17T18:24:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a4ce40914a1dd6cf7e98e427382be8dac080308","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tessel/t2-cli/pulls/450/commits","review_comments_url":"https://api.github.com/repos/tessel/t2-cli/pulls/450/comments","review_comment_url":"https://api.github.com/repos/tessel/t2-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tessel/t2-cli/issues/450/comments","statuses_url":"https://api.github.com/repos/tessel/t2-cli/statuses/ad6f2bd9aaa002bb3abfce0b45b9a3514cb44275","head":{"label":"rwaldron:449","ref":"449","sha":"ad6f2bd9aaa002bb3abfce0b45b9a3514cb44275","user":{"login":"rwaldron","id":27985,"avatar_url":"https://avatars.githubusercontent.com/u/27985?v=3","gravatar_id":"","url":"https://api.github.com/users/rwaldron","html_url":"https://github.com/rwaldron","followers_url":"https://api.github.com/users/rwaldron/followers","following_url":"https://api.github.com/users/rwaldron/following{/other_user}","gists_url":"https://api.github.com/users/rwaldron/gists{/gist_id}","starred_url":"https://api.github.com/users/rwaldron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwaldron/subscriptions","organizations_url":"https://api.github.com/users/rwaldron/orgs","repos_url":"https://api.github.com/users/rwaldron/repos","events_url":"https://api.github.com/users/rwaldron/events{/privacy}","received_events_url":"https://api.github.com/users/rwaldron/received_events","type":"User","site_admin":false},"repo":{"id":34642706,"name":"t2-cli","full_name":"rwaldron/t2-cli","owner":{"login":"rwaldron","id":27985,"avatar_url":"https://avatars.githubusercontent.com/u/27985?v=3","gravatar_id":"","url":"https://api.github.com/users/rwaldron","html_url":"https://github.com/rwaldron","followers_url":"https://api.github.com/users/rwaldron/followers","following_url":"https://api.github.com/users/rwaldron/following{/other_user}","gists_url":"https://api.github.com/users/rwaldron/gists{/gist_id}","starred_url":"https://api.github.com/users/rwaldron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwaldron/subscriptions","organizations_url":"https://api.github.com/users/rwaldron/orgs","repos_url":"https://api.github.com/users/rwaldron/repos","events_url":"https://api.github.com/users/rwaldron/events{/privacy}","received_events_url":"https://api.github.com/users/rwaldron/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rwaldron/t2-cli","description":"Command line interface to Tessel 2.","fork":true,"url":"https://api.github.com/repos/rwaldron/t2-cli","forks_url":"https://api.github.com/repos/rwaldron/t2-cli/forks","keys_url":"https://api.github.com/repos/rwaldron/t2-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rwaldron/t2-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rwaldron/t2-cli/teams","hooks_url":"https://api.github.com/repos/rwaldron/t2-cli/hooks","issue_events_url":"https://api.github.com/repos/rwaldron/t2-cli/issues/events{/number}","events_url":"https://api.github.com/repos/rwaldron/t2-cli/events","assignees_url":"https://api.github.com/repos/rwaldron/t2-cli/assignees{/user}","branches_url":"https://api.github.com/repos/rwaldron/t2-cli/branches{/branch}","tags_url":"https://api.github.com/repos/rwaldron/t2-cli/tags","blobs_url":"https://api.github.com/repos/rwaldron/t2-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rwaldron/t2-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rwaldron/t2-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/rwaldron/t2-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rwaldron/t2-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/rwaldron/t2-cli/languages","stargazers_url":"https://api.github.com/repos/rwaldron/t2-cli/stargazers","contributors_url":"https://api.github.com/repos/rwaldron/t2-cli/contributors","subscribers_url":"https://api.github.com/repos/rwaldron/t2-cli/subscribers","subscription_url":"https://api.github.com/repos/rwaldron/t2-cli/subscription","commits_url":"https://api.github.com/repos/rwaldron/t2-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/rwaldron/t2-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/rwaldron/t2-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/rwaldron/t2-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/rwaldron/t2-cli/contents/{+path}","compare_url":"https://api.github.com/repos/rwaldron/t2-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rwaldron/t2-cli/merges","archive_url":"https://api.github.com/repos/rwaldron/t2-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rwaldron/t2-cli/downloads","issues_url":"https://api.github.com/repos/rwaldron/t2-cli/issues{/number}","pulls_url":"https://api.github.com/repos/rwaldron/t2-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/rwaldron/t2-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/rwaldron/t2-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rwaldron/t2-cli/labels{/name}","releases_url":"https://api.github.com/repos/rwaldron/t2-cli/releases{/id}","created_at":"2015-04-27T02:53:48Z","updated_at":"2015-09-28T19:20:17Z","pushed_at":"2015-11-17T00:05:31Z","git_url":"git://github.com/rwaldron/t2-cli.git","ssh_url":"git@github.com:rwaldron/t2-cli.git","clone_url":"https://github.com/rwaldron/t2-cli.git","svn_url":"https://github.com/rwaldron/t2-cli","homepage":"","size":695,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tessel:master","ref":"master","sha":"b92a848994f4e44b64c5f350df0d11975a250101","user":{"login":"tessel","id":5573563,"avatar_url":"https://avatars.githubusercontent.com/u/5573563?v=3","gravatar_id":"","url":"https://api.github.com/users/tessel","html_url":"https://github.com/tessel","followers_url":"https://api.github.com/users/tessel/followers","following_url":"https://api.github.com/users/tessel/following{/other_user}","gists_url":"https://api.github.com/users/tessel/gists{/gist_id}","starred_url":"https://api.github.com/users/tessel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tessel/subscriptions","organizations_url":"https://api.github.com/users/tessel/orgs","repos_url":"https://api.github.com/users/tessel/repos","events_url":"https://api.github.com/users/tessel/events{/privacy}","received_events_url":"https://api.github.com/users/tessel/received_events","type":"Organization","site_admin":false},"repo":{"id":30388450,"name":"t2-cli","full_name":"tessel/t2-cli","owner":{"login":"tessel","id":5573563,"avatar_url":"https://avatars.githubusercontent.com/u/5573563?v=3","gravatar_id":"","url":"https://api.github.com/users/tessel","html_url":"https://github.com/tessel","followers_url":"https://api.github.com/users/tessel/followers","following_url":"https://api.github.com/users/tessel/following{/other_user}","gists_url":"https://api.github.com/users/tessel/gists{/gist_id}","starred_url":"https://api.github.com/users/tessel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tessel/subscriptions","organizations_url":"https://api.github.com/users/tessel/orgs","repos_url":"https://api.github.com/users/tessel/repos","events_url":"https://api.github.com/users/tessel/events{/privacy}","received_events_url":"https://api.github.com/users/tessel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tessel/t2-cli","description":"Command line interface to Tessel 2.","fork":false,"url":"https://api.github.com/repos/tessel/t2-cli","forks_url":"https://api.github.com/repos/tessel/t2-cli/forks","keys_url":"https://api.github.com/repos/tessel/t2-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tessel/t2-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tessel/t2-cli/teams","hooks_url":"https://api.github.com/repos/tessel/t2-cli/hooks","issue_events_url":"https://api.github.com/repos/tessel/t2-cli/issues/events{/number}","events_url":"https://api.github.com/repos/tessel/t2-cli/events","assignees_url":"https://api.github.com/repos/tessel/t2-cli/assignees{/user}","branches_url":"https://api.github.com/repos/tessel/t2-cli/branches{/branch}","tags_url":"https://api.github.com/repos/tessel/t2-cli/tags","blobs_url":"https://api.github.com/repos/tessel/t2-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tessel/t2-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tessel/t2-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/tessel/t2-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tessel/t2-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/tessel/t2-cli/languages","stargazers_url":"https://api.github.com/repos/tessel/t2-cli/stargazers","contributors_url":"https://api.github.com/repos/tessel/t2-cli/contributors","subscribers_url":"https://api.github.com/repos/tessel/t2-cli/subscribers","subscription_url":"https://api.github.com/repos/tessel/t2-cli/subscription","commits_url":"https://api.github.com/repos/tessel/t2-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/tessel/t2-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/tessel/t2-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/tessel/t2-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/tessel/t2-cli/contents/{+path}","compare_url":"https://api.github.com/repos/tessel/t2-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tessel/t2-cli/merges","archive_url":"https://api.github.com/repos/tessel/t2-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tessel/t2-cli/downloads","issues_url":"https://api.github.com/repos/tessel/t2-cli/issues{/number}","pulls_url":"https://api.github.com/repos/tessel/t2-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/tessel/t2-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/tessel/t2-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tessel/t2-cli/labels{/name}","releases_url":"https://api.github.com/repos/tessel/t2-cli/releases{/id}","created_at":"2015-02-06T01:27:53Z","updated_at":"2015-11-17T14:45:55Z","pushed_at":"2015-11-17T17:51:21Z","git_url":"git://github.com/tessel/t2-cli.git","ssh_url":"git@github.com:tessel/t2-cli.git","clone_url":"https://github.com/tessel/t2-cli.git","svn_url":"https://github.com/tessel/t2-cli","homepage":"","size":974,"stargazers_count":36,"watchers_count":36,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":73,"forks":13,"open_issues":73,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tessel/t2-cli/pulls/450"},"html":{"href":"https://github.com/tessel/t2-cli/pull/450"},"issue":{"href":"https://api.github.com/repos/tessel/t2-cli/issues/450"},"comments":{"href":"https://api.github.com/repos/tessel/t2-cli/issues/450/comments"},"review_comments":{"href":"https://api.github.com/repos/tessel/t2-cli/pulls/450/comments"},"review_comment":{"href":"https://api.github.com/repos/tessel/t2-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tessel/t2-cli/pulls/450/commits"},"statuses":{"href":"https://api.github.com/repos/tessel/t2-cli/statuses/ad6f2bd9aaa002bb3abfce0b45b9a3514cb44275"}}}}