{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/web-ext/pulls/comments/79912663","id":79912663,"diff_hunk":"@@ -103,7 +103,9 @@ export class Program {\n       await runCommand(argv);\n     } catch (error) {\n       const prefix = cmd ? `${cmd}: ` : '';\n-      log.error(`\\n${prefix}${error.stack}\\n`);\n+      if (!error instanceof UsageError) {","path":"src/program.js","position":28,"original_position":28,"commit_id":"df9b02d91b7136a6667d3fa52362eba1517c2d03","original_commit_id":"df9b02d91b7136a6667d3fa52362eba1517c2d03","user":{"login":"kumar303","id":55398,"avatar_url":"https://avatars.githubusercontent.com/u/55398?v=3","gravatar_id":"","url":"https://api.github.com/users/kumar303","html_url":"https://github.com/kumar303","followers_url":"https://api.github.com/users/kumar303/followers","following_url":"https://api.github.com/users/kumar303/following{/other_user}","gists_url":"https://api.github.com/users/kumar303/gists{/gist_id}","starred_url":"https://api.github.com/users/kumar303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumar303/subscriptions","organizations_url":"https://api.github.com/users/kumar303/orgs","repos_url":"https://api.github.com/users/kumar303/repos","events_url":"https://api.github.com/users/kumar303/events{/privacy}","received_events_url":"https://api.github.com/users/kumar303/received_events","type":"User","site_admin":false},"body":"The coverage report says the `log` statement within this if branch isn't covered but we definitely have a test that covers it. This makes me think the JS interpreter is parsing `!error` before passing the value to `instanceof`. Try this instead and let's see if the code coverage goes back to 100%:\r\n````javascript\r\nif (!(error instanceof UsageError)) {\r\n}\r\n````","created_at":"2016-09-21T19:24:26Z","updated_at":"2016-09-21T19:25:45Z","html_url":"https://github.com/mozilla/web-ext/pull/509#discussion_r79912663","pull_request_url":"https://api.github.com/repos/mozilla/web-ext/pulls/509","_links":{"self":{"href":"https://api.github.com/repos/mozilla/web-ext/pulls/comments/79912663"},"html":{"href":"https://github.com/mozilla/web-ext/pull/509#discussion_r79912663"},"pull_request":{"href":"https://api.github.com/repos/mozilla/web-ext/pulls/509"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/web-ext/pulls/509","id":86043608,"html_url":"https://github.com/mozilla/web-ext/pull/509","diff_url":"https://github.com/mozilla/web-ext/pull/509.diff","patch_url":"https://github.com/mozilla/web-ext/pull/509.patch","issue_url":"https://api.github.com/repos/mozilla/web-ext/issues/509","number":509,"state":"open","locked":false,"title":"refactor: Show usage exceptions without a stacktrace","user":{"login":"shubheksha","id":7693422,"avatar_url":"https://avatars.githubusercontent.com/u/7693422?v=3","gravatar_id":"","url":"https://api.github.com/users/shubheksha","html_url":"https://github.com/shubheksha","followers_url":"https://api.github.com/users/shubheksha/followers","following_url":"https://api.github.com/users/shubheksha/following{/other_user}","gists_url":"https://api.github.com/users/shubheksha/gists{/gist_id}","starred_url":"https://api.github.com/users/shubheksha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shubheksha/subscriptions","organizations_url":"https://api.github.com/users/shubheksha/orgs","repos_url":"https://api.github.com/users/shubheksha/repos","events_url":"https://api.github.com/users/shubheksha/events{/privacy}","received_events_url":"https://api.github.com/users/shubheksha/received_events","type":"User","site_admin":false},"body":"Fixes #310 partially.\r\n- Created a UsageError class \r\n- Converted some of the tests from WebExtError to UsageError","created_at":"2016-09-20T19:47:06Z","updated_at":"2016-09-21T19:25:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"84a3d460ea0e18a1faca14dea1a9e735f693cd71","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/web-ext/pulls/509/commits","review_comments_url":"https://api.github.com/repos/mozilla/web-ext/pulls/509/comments","review_comment_url":"https://api.github.com/repos/mozilla/web-ext/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/web-ext/issues/509/comments","statuses_url":"https://api.github.com/repos/mozilla/web-ext/statuses/df9b02d91b7136a6667d3fa52362eba1517c2d03","head":{"label":"shubheksha:fix/310","ref":"fix/310","sha":"df9b02d91b7136a6667d3fa52362eba1517c2d03","user":{"login":"shubheksha","id":7693422,"avatar_url":"https://avatars.githubusercontent.com/u/7693422?v=3","gravatar_id":"","url":"https://api.github.com/users/shubheksha","html_url":"https://github.com/shubheksha","followers_url":"https://api.github.com/users/shubheksha/followers","following_url":"https://api.github.com/users/shubheksha/following{/other_user}","gists_url":"https://api.github.com/users/shubheksha/gists{/gist_id}","starred_url":"https://api.github.com/users/shubheksha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shubheksha/subscriptions","organizations_url":"https://api.github.com/users/shubheksha/orgs","repos_url":"https://api.github.com/users/shubheksha/repos","events_url":"https://api.github.com/users/shubheksha/events{/privacy}","received_events_url":"https://api.github.com/users/shubheksha/received_events","type":"User","site_admin":false},"repo":{"id":65824381,"name":"web-ext","full_name":"shubheksha/web-ext","owner":{"login":"shubheksha","id":7693422,"avatar_url":"https://avatars.githubusercontent.com/u/7693422?v=3","gravatar_id":"","url":"https://api.github.com/users/shubheksha","html_url":"https://github.com/shubheksha","followers_url":"https://api.github.com/users/shubheksha/followers","following_url":"https://api.github.com/users/shubheksha/following{/other_user}","gists_url":"https://api.github.com/users/shubheksha/gists{/gist_id}","starred_url":"https://api.github.com/users/shubheksha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shubheksha/subscriptions","organizations_url":"https://api.github.com/users/shubheksha/orgs","repos_url":"https://api.github.com/users/shubheksha/repos","events_url":"https://api.github.com/users/shubheksha/events{/privacy}","received_events_url":"https://api.github.com/users/shubheksha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shubheksha/web-ext","description":"A command line tool to help build, run, and test web extensions","fork":true,"url":"https://api.github.com/repos/shubheksha/web-ext","forks_url":"https://api.github.com/repos/shubheksha/web-ext/forks","keys_url":"https://api.github.com/repos/shubheksha/web-ext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shubheksha/web-ext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shubheksha/web-ext/teams","hooks_url":"https://api.github.com/repos/shubheksha/web-ext/hooks","issue_events_url":"https://api.github.com/repos/shubheksha/web-ext/issues/events{/number}","events_url":"https://api.github.com/repos/shubheksha/web-ext/events","assignees_url":"https://api.github.com/repos/shubheksha/web-ext/assignees{/user}","branches_url":"https://api.github.com/repos/shubheksha/web-ext/branches{/branch}","tags_url":"https://api.github.com/repos/shubheksha/web-ext/tags","blobs_url":"https://api.github.com/repos/shubheksha/web-ext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shubheksha/web-ext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shubheksha/web-ext/git/refs{/sha}","trees_url":"https://api.github.com/repos/shubheksha/web-ext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shubheksha/web-ext/statuses/{sha}","languages_url":"https://api.github.com/repos/shubheksha/web-ext/languages","stargazers_url":"https://api.github.com/repos/shubheksha/web-ext/stargazers","contributors_url":"https://api.github.com/repos/shubheksha/web-ext/contributors","subscribers_url":"https://api.github.com/repos/shubheksha/web-ext/subscribers","subscription_url":"https://api.github.com/repos/shubheksha/web-ext/subscription","commits_url":"https://api.github.com/repos/shubheksha/web-ext/commits{/sha}","git_commits_url":"https://api.github.com/repos/shubheksha/web-ext/git/commits{/sha}","comments_url":"https://api.github.com/repos/shubheksha/web-ext/comments{/number}","issue_comment_url":"https://api.github.com/repos/shubheksha/web-ext/issues/comments{/number}","contents_url":"https://api.github.com/repos/shubheksha/web-ext/contents/{+path}","compare_url":"https://api.github.com/repos/shubheksha/web-ext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shubheksha/web-ext/merges","archive_url":"https://api.github.com/repos/shubheksha/web-ext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shubheksha/web-ext/downloads","issues_url":"https://api.github.com/repos/shubheksha/web-ext/issues{/number}","pulls_url":"https://api.github.com/repos/shubheksha/web-ext/pulls{/number}","milestones_url":"https://api.github.com/repos/shubheksha/web-ext/milestones{/number}","notifications_url":"https://api.github.com/repos/shubheksha/web-ext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shubheksha/web-ext/labels{/name}","releases_url":"https://api.github.com/repos/shubheksha/web-ext/releases{/id}","deployments_url":"https://api.github.com/repos/shubheksha/web-ext/deployments","created_at":"2016-08-16T13:52:30Z","updated_at":"2016-08-16T13:52:32Z","pushed_at":"2016-09-20T21:02:06Z","git_url":"git://github.com/shubheksha/web-ext.git","ssh_url":"git@github.com:shubheksha/web-ext.git","clone_url":"https://github.com/shubheksha/web-ext.git","svn_url":"https://github.com/shubheksha/web-ext","homepage":null,"size":487,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"mozilla:master","ref":"master","sha":"53e75778dce17d1b6735d5d36d4b307df2716aa0","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":50859563,"name":"web-ext","full_name":"mozilla/web-ext","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/web-ext","description":"A command line tool to help build, run, and test web extensions","fork":false,"url":"https://api.github.com/repos/mozilla/web-ext","forks_url":"https://api.github.com/repos/mozilla/web-ext/forks","keys_url":"https://api.github.com/repos/mozilla/web-ext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/web-ext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/web-ext/teams","hooks_url":"https://api.github.com/repos/mozilla/web-ext/hooks","issue_events_url":"https://api.github.com/repos/mozilla/web-ext/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/web-ext/events","assignees_url":"https://api.github.com/repos/mozilla/web-ext/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/web-ext/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/web-ext/tags","blobs_url":"https://api.github.com/repos/mozilla/web-ext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/web-ext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/web-ext/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/web-ext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/web-ext/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/web-ext/languages","stargazers_url":"https://api.github.com/repos/mozilla/web-ext/stargazers","contributors_url":"https://api.github.com/repos/mozilla/web-ext/contributors","subscribers_url":"https://api.github.com/repos/mozilla/web-ext/subscribers","subscription_url":"https://api.github.com/repos/mozilla/web-ext/subscription","commits_url":"https://api.github.com/repos/mozilla/web-ext/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/web-ext/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/web-ext/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/web-ext/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/web-ext/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/web-ext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/web-ext/merges","archive_url":"https://api.github.com/repos/mozilla/web-ext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/web-ext/downloads","issues_url":"https://api.github.com/repos/mozilla/web-ext/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/web-ext/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/web-ext/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/web-ext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/web-ext/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/web-ext/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/web-ext/deployments","created_at":"2016-02-01T18:08:32Z","updated_at":"2016-09-20T15:16:32Z","pushed_at":"2016-09-21T16:00:12Z","git_url":"git://github.com/mozilla/web-ext.git","ssh_url":"git@github.com:mozilla/web-ext.git","clone_url":"https://github.com/mozilla/web-ext.git","svn_url":"https://github.com/mozilla/web-ext","homepage":null,"size":610,"stargazers_count":75,"watchers_count":75,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":57,"forks":32,"open_issues":57,"watchers":75,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/web-ext/pulls/509"},"html":{"href":"https://github.com/mozilla/web-ext/pull/509"},"issue":{"href":"https://api.github.com/repos/mozilla/web-ext/issues/509"},"comments":{"href":"https://api.github.com/repos/mozilla/web-ext/issues/509/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/web-ext/pulls/509/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/web-ext/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/web-ext/pulls/509/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/web-ext/statuses/df9b02d91b7136a6667d3fa52362eba1517c2d03"}}}}
{"actor":{"display_login":"kumar303"}}