{"action":"created","comment":{"url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/comments/49029181","id":49029181,"diff_hunk":"@@ -641,10 +641,14 @@ private void openCamera(int cameraId)\n \t\t\tcamera = null;\n \t\t}\n \n-\t\tif (cameraId == Integer.MIN_VALUE) {\n-\t\t\tcamera = Camera.open();\n-\t\t} else {\n-\t\t\tcamera = Camera.open(cameraId);\n+\t\ttry {\n+\t\t\tif (cameraId == Integer.MIN_VALUE) {\n+\t\t\t\tcamera = Camera.open();\n+\t\t\t} else {\n+\t\t\t\tcamera = Camera.open(cameraId);\n+\t\t\t}\n+\t\t} catch (Exception e) {","path":"android/modules/media/src/java/ti/modules/titanium/media/TiCameraActivity.java","position":14,"original_position":14,"commit_id":"3bada26664afa78fc6f7f0a681bc3c15c17a36a5","original_commit_id":"3bada26664afa78fc6f7f0a681bc3c15c17a36a5","user":{"login":"ashcoding","id":9311952,"avatar_url":"https://avatars.githubusercontent.com/u/9311952?v=3","gravatar_id":"","url":"https://api.github.com/users/ashcoding","html_url":"https://github.com/ashcoding","followers_url":"https://api.github.com/users/ashcoding/followers","following_url":"https://api.github.com/users/ashcoding/following{/other_user}","gists_url":"https://api.github.com/users/ashcoding/gists{/gist_id}","starred_url":"https://api.github.com/users/ashcoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashcoding/subscriptions","organizations_url":"https://api.github.com/users/ashcoding/orgs","repos_url":"https://api.github.com/users/ashcoding/repos","events_url":"https://api.github.com/users/ashcoding/events{/privacy}","received_events_url":"https://api.github.com/users/ashcoding/received_events","type":"User","site_admin":false},"body":"And would it be better to use `RuntimeException` instead of a general `Exception`?","created_at":"2016-01-07T00:29:08Z","updated_at":"2016-01-07T00:29:08Z","html_url":"https://github.com/appcelerator/titanium_mobile/pull/7616#discussion_r49029181","pull_request_url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/7616","_links":{"self":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/comments/49029181"},"html":{"href":"https://github.com/appcelerator/titanium_mobile/pull/7616#discussion_r49029181"},"pull_request":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/7616"}}},"pull_request":{"url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/7616","id":55230787,"html_url":"https://github.com/appcelerator/titanium_mobile/pull/7616","diff_url":"https://github.com/appcelerator/titanium_mobile/pull/7616.diff","patch_url":"https://github.com/appcelerator/titanium_mobile/pull/7616.patch","issue_url":"https://api.github.com/repos/appcelerator/titanium_mobile/issues/7616","number":7616,"state":"open","locked":false,"title":"[TC-5825] Android: Camera.open() can throw a RuntimeException.","user":{"login":"collinprice","id":187208,"avatar_url":"https://avatars.githubusercontent.com/u/187208?v=3","gravatar_id":"","url":"https://api.github.com/users/collinprice","html_url":"https://github.com/collinprice","followers_url":"https://api.github.com/users/collinprice/followers","following_url":"https://api.github.com/users/collinprice/following{/other_user}","gists_url":"https://api.github.com/users/collinprice/gists{/gist_id}","starred_url":"https://api.github.com/users/collinprice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collinprice/subscriptions","organizations_url":"https://api.github.com/users/collinprice/orgs","repos_url":"https://api.github.com/users/collinprice/repos","events_url":"https://api.github.com/users/collinprice/events{/privacy}","received_events_url":"https://api.github.com/users/collinprice/received_events","type":"User","site_admin":false},"body":"[Issue](https://jira.appcelerator.org/browse/TC-5825): Added try catch block to prevent crashes when Camera.open() fails at Runtime.","created_at":"2016-01-06T16:16:41Z","updated_at":"2016-01-07T00:29:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"232e873c0a0a10d60ed12165924267aa5c0af136","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/7616/commits","review_comments_url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/7616/comments","review_comment_url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/comments{/number}","comments_url":"https://api.github.com/repos/appcelerator/titanium_mobile/issues/7616/comments","statuses_url":"https://api.github.com/repos/appcelerator/titanium_mobile/statuses/3bada26664afa78fc6f7f0a681bc3c15c17a36a5","head":{"label":"collinprice:master","ref":"master","sha":"3bada26664afa78fc6f7f0a681bc3c15c17a36a5","user":{"login":"collinprice","id":187208,"avatar_url":"https://avatars.githubusercontent.com/u/187208?v=3","gravatar_id":"","url":"https://api.github.com/users/collinprice","html_url":"https://github.com/collinprice","followers_url":"https://api.github.com/users/collinprice/followers","following_url":"https://api.github.com/users/collinprice/following{/other_user}","gists_url":"https://api.github.com/users/collinprice/gists{/gist_id}","starred_url":"https://api.github.com/users/collinprice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collinprice/subscriptions","organizations_url":"https://api.github.com/users/collinprice/orgs","repos_url":"https://api.github.com/users/collinprice/repos","events_url":"https://api.github.com/users/collinprice/events{/privacy}","received_events_url":"https://api.github.com/users/collinprice/received_events","type":"User","site_admin":false},"repo":{"id":38437550,"name":"titanium_mobile","full_name":"collinprice/titanium_mobile","owner":{"login":"collinprice","id":187208,"avatar_url":"https://avatars.githubusercontent.com/u/187208?v=3","gravatar_id":"","url":"https://api.github.com/users/collinprice","html_url":"https://github.com/collinprice","followers_url":"https://api.github.com/users/collinprice/followers","following_url":"https://api.github.com/users/collinprice/following{/other_user}","gists_url":"https://api.github.com/users/collinprice/gists{/gist_id}","starred_url":"https://api.github.com/users/collinprice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collinprice/subscriptions","organizations_url":"https://api.github.com/users/collinprice/orgs","repos_url":"https://api.github.com/users/collinprice/repos","events_url":"https://api.github.com/users/collinprice/events{/privacy}","received_events_url":"https://api.github.com/users/collinprice/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/collinprice/titanium_mobile","description":"Appcelerator Titanium Mobile","fork":true,"url":"https://api.github.com/repos/collinprice/titanium_mobile","forks_url":"https://api.github.com/repos/collinprice/titanium_mobile/forks","keys_url":"https://api.github.com/repos/collinprice/titanium_mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/collinprice/titanium_mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/collinprice/titanium_mobile/teams","hooks_url":"https://api.github.com/repos/collinprice/titanium_mobile/hooks","issue_events_url":"https://api.github.com/repos/collinprice/titanium_mobile/issues/events{/number}","events_url":"https://api.github.com/repos/collinprice/titanium_mobile/events","assignees_url":"https://api.github.com/repos/collinprice/titanium_mobile/assignees{/user}","branches_url":"https://api.github.com/repos/collinprice/titanium_mobile/branches{/branch}","tags_url":"https://api.github.com/repos/collinprice/titanium_mobile/tags","blobs_url":"https://api.github.com/repos/collinprice/titanium_mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/collinprice/titanium_mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/collinprice/titanium_mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/collinprice/titanium_mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/collinprice/titanium_mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/collinprice/titanium_mobile/languages","stargazers_url":"https://api.github.com/repos/collinprice/titanium_mobile/stargazers","contributors_url":"https://api.github.com/repos/collinprice/titanium_mobile/contributors","subscribers_url":"https://api.github.com/repos/collinprice/titanium_mobile/subscribers","subscription_url":"https://api.github.com/repos/collinprice/titanium_mobile/subscription","commits_url":"https://api.github.com/repos/collinprice/titanium_mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/collinprice/titanium_mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/collinprice/titanium_mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/collinprice/titanium_mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/collinprice/titanium_mobile/contents/{+path}","compare_url":"https://api.github.com/repos/collinprice/titanium_mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/collinprice/titanium_mobile/merges","archive_url":"https://api.github.com/repos/collinprice/titanium_mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/collinprice/titanium_mobile/downloads","issues_url":"https://api.github.com/repos/collinprice/titanium_mobile/issues{/number}","pulls_url":"https://api.github.com/repos/collinprice/titanium_mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/collinprice/titanium_mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/collinprice/titanium_mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/collinprice/titanium_mobile/labels{/name}","releases_url":"https://api.github.com/repos/collinprice/titanium_mobile/releases{/id}","created_at":"2015-07-02T14:30:30Z","updated_at":"2015-07-02T14:30:42Z","pushed_at":"2016-01-06T15:58:12Z","git_url":"git://github.com/collinprice/titanium_mobile.git","ssh_url":"git@github.com:collinprice/titanium_mobile.git","clone_url":"https://github.com/collinprice/titanium_mobile.git","svn_url":"https://github.com/collinprice/titanium_mobile","homepage":"http://www.appcelerator.com","size":887589,"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":"appcelerator:master","ref":"master","sha":"fd96af9d0973a9bafeedd002bca99359f130e06c","user":{"login":"appcelerator","id":82188,"avatar_url":"https://avatars.githubusercontent.com/u/82188?v=3","gravatar_id":"","url":"https://api.github.com/users/appcelerator","html_url":"https://github.com/appcelerator","followers_url":"https://api.github.com/users/appcelerator/followers","following_url":"https://api.github.com/users/appcelerator/following{/other_user}","gists_url":"https://api.github.com/users/appcelerator/gists{/gist_id}","starred_url":"https://api.github.com/users/appcelerator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appcelerator/subscriptions","organizations_url":"https://api.github.com/users/appcelerator/orgs","repos_url":"https://api.github.com/users/appcelerator/repos","events_url":"https://api.github.com/users/appcelerator/events{/privacy}","received_events_url":"https://api.github.com/users/appcelerator/received_events","type":"Organization","site_admin":false},"repo":{"id":228094,"name":"titanium_mobile","full_name":"appcelerator/titanium_mobile","owner":{"login":"appcelerator","id":82188,"avatar_url":"https://avatars.githubusercontent.com/u/82188?v=3","gravatar_id":"","url":"https://api.github.com/users/appcelerator","html_url":"https://github.com/appcelerator","followers_url":"https://api.github.com/users/appcelerator/followers","following_url":"https://api.github.com/users/appcelerator/following{/other_user}","gists_url":"https://api.github.com/users/appcelerator/gists{/gist_id}","starred_url":"https://api.github.com/users/appcelerator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appcelerator/subscriptions","organizations_url":"https://api.github.com/users/appcelerator/orgs","repos_url":"https://api.github.com/users/appcelerator/repos","events_url":"https://api.github.com/users/appcelerator/events{/privacy}","received_events_url":"https://api.github.com/users/appcelerator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/appcelerator/titanium_mobile","description":"Appcelerator Titanium Mobile","fork":false,"url":"https://api.github.com/repos/appcelerator/titanium_mobile","forks_url":"https://api.github.com/repos/appcelerator/titanium_mobile/forks","keys_url":"https://api.github.com/repos/appcelerator/titanium_mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appcelerator/titanium_mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appcelerator/titanium_mobile/teams","hooks_url":"https://api.github.com/repos/appcelerator/titanium_mobile/hooks","issue_events_url":"https://api.github.com/repos/appcelerator/titanium_mobile/issues/events{/number}","events_url":"https://api.github.com/repos/appcelerator/titanium_mobile/events","assignees_url":"https://api.github.com/repos/appcelerator/titanium_mobile/assignees{/user}","branches_url":"https://api.github.com/repos/appcelerator/titanium_mobile/branches{/branch}","tags_url":"https://api.github.com/repos/appcelerator/titanium_mobile/tags","blobs_url":"https://api.github.com/repos/appcelerator/titanium_mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appcelerator/titanium_mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appcelerator/titanium_mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/appcelerator/titanium_mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appcelerator/titanium_mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/appcelerator/titanium_mobile/languages","stargazers_url":"https://api.github.com/repos/appcelerator/titanium_mobile/stargazers","contributors_url":"https://api.github.com/repos/appcelerator/titanium_mobile/contributors","subscribers_url":"https://api.github.com/repos/appcelerator/titanium_mobile/subscribers","subscription_url":"https://api.github.com/repos/appcelerator/titanium_mobile/subscription","commits_url":"https://api.github.com/repos/appcelerator/titanium_mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/appcelerator/titanium_mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/appcelerator/titanium_mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/appcelerator/titanium_mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/appcelerator/titanium_mobile/contents/{+path}","compare_url":"https://api.github.com/repos/appcelerator/titanium_mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appcelerator/titanium_mobile/merges","archive_url":"https://api.github.com/repos/appcelerator/titanium_mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appcelerator/titanium_mobile/downloads","issues_url":"https://api.github.com/repos/appcelerator/titanium_mobile/issues{/number}","pulls_url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/appcelerator/titanium_mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/appcelerator/titanium_mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appcelerator/titanium_mobile/labels{/name}","releases_url":"https://api.github.com/repos/appcelerator/titanium_mobile/releases{/id}","created_at":"2009-06-15T22:54:37Z","updated_at":"2016-01-05T18:04:16Z","pushed_at":"2016-01-06T21:15:39Z","git_url":"git://github.com/appcelerator/titanium_mobile.git","ssh_url":"git@github.com:appcelerator/titanium_mobile.git","clone_url":"https://github.com/appcelerator/titanium_mobile.git","svn_url":"https://github.com/appcelerator/titanium_mobile","homepage":"http://www.appcelerator.com","size":1027403,"stargazers_count":2010,"watchers_count":2010,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1071,"mirror_url":null,"open_issues_count":76,"forks":1071,"open_issues":76,"watchers":2010,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/7616"},"html":{"href":"https://github.com/appcelerator/titanium_mobile/pull/7616"},"issue":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/issues/7616"},"comments":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/issues/7616/comments"},"review_comments":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/7616/comments"},"review_comment":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/7616/commits"},"statuses":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/statuses/3bada26664afa78fc6f7f0a681bc3c15c17a36a5"}}}}