{"action":"created","comment":{"url":"https://api.github.com/repos/natario1/CameraView/pulls/comments/142958682","pull_request_review_id":67395457,"id":142958682,"diff_hunk":"@@ -1308,6 +1308,7 @@ public boolean getPlaySounds() {\n         void dispatchOnFocusEnd(@Nullable Gesture trigger, boolean success, PointF where);\n         void dispatchOnZoomChanged(final float newValue, final PointF[] fingers);\n         void dispatchOnExposureCorrectionChanged(float newValue, float[] bounds, PointF[] fingers);\n+        void onError(String message, Exception cause);","path":"cameraview/src/main/java/com/otaliastudios/cameraview/CameraView.java","position":4,"original_position":4,"commit_id":"8a168355600061f615f8cb49519a8193bb21fc76","original_commit_id":"8a168355600061f615f8cb49519a8193bb21fc76","user":{"login":"natario1","id":15526561,"avatar_url":"https://avatars2.githubusercontent.com/u/15526561?v=4","gravatar_id":"","url":"https://api.github.com/users/natario1","html_url":"https://github.com/natario1","followers_url":"https://api.github.com/users/natario1/followers","following_url":"https://api.github.com/users/natario1/following{/other_user}","gists_url":"https://api.github.com/users/natario1/gists{/gist_id}","starred_url":"https://api.github.com/users/natario1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natario1/subscriptions","organizations_url":"https://api.github.com/users/natario1/orgs","repos_url":"https://api.github.com/users/natario1/repos","events_url":"https://api.github.com/users/natario1/events{/privacy}","received_events_url":"https://api.github.com/users/natario1/received_events","type":"User","site_admin":false},"body":"This is not fundamental, but I think it's better if this would accept directly a `CameraException`, so who first gets the error must instantiate a CameraException and pass it here.\r\n\r\nThis would be useful if one day we want to add more functionality into `CameraException` (for example an integer describing the kind of error)","created_at":"2017-10-05T14:43:22Z","updated_at":"2017-10-05T14:45:59Z","html_url":"https://github.com/natario1/CameraView/pull/59#discussion_r142958682","pull_request_url":"https://api.github.com/repos/natario1/CameraView/pulls/59","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/natario1/CameraView/pulls/comments/142958682"},"html":{"href":"https://github.com/natario1/CameraView/pull/59#discussion_r142958682"},"pull_request":{"href":"https://api.github.com/repos/natario1/CameraView/pulls/59"}}},"pull_request":{"url":"https://api.github.com/repos/natario1/CameraView/pulls/59","id":144927821,"html_url":"https://github.com/natario1/CameraView/pull/59","diff_url":"https://github.com/natario1/CameraView/pull/59.diff","patch_url":"https://github.com/natario1/CameraView/pull/59.patch","issue_url":"https://api.github.com/repos/natario1/CameraView/issues/59","number":59,"state":"open","locked":false,"title":"Implement basic error handling","user":{"login":"Johnson145","id":6339078,"avatar_url":"https://avatars0.githubusercontent.com/u/6339078?v=4","gravatar_id":"","url":"https://api.github.com/users/Johnson145","html_url":"https://github.com/Johnson145","followers_url":"https://api.github.com/users/Johnson145/followers","following_url":"https://api.github.com/users/Johnson145/following{/other_user}","gists_url":"https://api.github.com/users/Johnson145/gists{/gist_id}","starred_url":"https://api.github.com/users/Johnson145/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Johnson145/subscriptions","organizations_url":"https://api.github.com/users/Johnson145/orgs","repos_url":"https://api.github.com/users/Johnson145/repos","events_url":"https://api.github.com/users/Johnson145/events{/privacy}","received_events_url":"https://api.github.com/users/Johnson145/received_events","type":"User","site_admin":false},"body":"I've added a new `onError` listener to catch exceptions that occur during crucial camera state changes. In each of these cases, the camera is (almost certainly) unavailable.\r\n\r\nIn general, this is necessary as some exceptions can't be prevent, because they describe temporary errors. This is the case e.g. for `RuntimeException: Fail to connect to camera service ` (see #28).\r\n\r\nI know error handling is part of your road map and it could be extended to handle even more cases. So feel free to ignore this pull request. However, it's essential for me to prevent app crashes and inform the user about the unavailable camera.","created_at":"2017-10-05T14:11:53Z","updated_at":"2017-10-05T14:45:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7a28094c1ec223fdd478c98d53827ae0bf4f1bb","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/natario1/CameraView/pulls/59/commits","review_comments_url":"https://api.github.com/repos/natario1/CameraView/pulls/59/comments","review_comment_url":"https://api.github.com/repos/natario1/CameraView/pulls/comments{/number}","comments_url":"https://api.github.com/repos/natario1/CameraView/issues/59/comments","statuses_url":"https://api.github.com/repos/natario1/CameraView/statuses/8a168355600061f615f8cb49519a8193bb21fc76","head":{"label":"Johnson145:error_handling","ref":"error_handling","sha":"8a168355600061f615f8cb49519a8193bb21fc76","user":{"login":"Johnson145","id":6339078,"avatar_url":"https://avatars0.githubusercontent.com/u/6339078?v=4","gravatar_id":"","url":"https://api.github.com/users/Johnson145","html_url":"https://github.com/Johnson145","followers_url":"https://api.github.com/users/Johnson145/followers","following_url":"https://api.github.com/users/Johnson145/following{/other_user}","gists_url":"https://api.github.com/users/Johnson145/gists{/gist_id}","starred_url":"https://api.github.com/users/Johnson145/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Johnson145/subscriptions","organizations_url":"https://api.github.com/users/Johnson145/orgs","repos_url":"https://api.github.com/users/Johnson145/repos","events_url":"https://api.github.com/users/Johnson145/events{/privacy}","received_events_url":"https://api.github.com/users/Johnson145/received_events","type":"User","site_admin":false},"repo":{"id":104938912,"name":"CameraView","full_name":"Johnson145/CameraView","owner":{"login":"Johnson145","id":6339078,"avatar_url":"https://avatars0.githubusercontent.com/u/6339078?v=4","gravatar_id":"","url":"https://api.github.com/users/Johnson145","html_url":"https://github.com/Johnson145","followers_url":"https://api.github.com/users/Johnson145/followers","following_url":"https://api.github.com/users/Johnson145/following{/other_user}","gists_url":"https://api.github.com/users/Johnson145/gists{/gist_id}","starred_url":"https://api.github.com/users/Johnson145/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Johnson145/subscriptions","organizations_url":"https://api.github.com/users/Johnson145/orgs","repos_url":"https://api.github.com/users/Johnson145/repos","events_url":"https://api.github.com/users/Johnson145/events{/privacy}","received_events_url":"https://api.github.com/users/Johnson145/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Johnson145/CameraView","description":"A well documented, high-level Android interface that makes capturing pictures and videos easy, addressing most of the common issues and needs.","fork":true,"url":"https://api.github.com/repos/Johnson145/CameraView","forks_url":"https://api.github.com/repos/Johnson145/CameraView/forks","keys_url":"https://api.github.com/repos/Johnson145/CameraView/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Johnson145/CameraView/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Johnson145/CameraView/teams","hooks_url":"https://api.github.com/repos/Johnson145/CameraView/hooks","issue_events_url":"https://api.github.com/repos/Johnson145/CameraView/issues/events{/number}","events_url":"https://api.github.com/repos/Johnson145/CameraView/events","assignees_url":"https://api.github.com/repos/Johnson145/CameraView/assignees{/user}","branches_url":"https://api.github.com/repos/Johnson145/CameraView/branches{/branch}","tags_url":"https://api.github.com/repos/Johnson145/CameraView/tags","blobs_url":"https://api.github.com/repos/Johnson145/CameraView/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Johnson145/CameraView/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Johnson145/CameraView/git/refs{/sha}","trees_url":"https://api.github.com/repos/Johnson145/CameraView/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Johnson145/CameraView/statuses/{sha}","languages_url":"https://api.github.com/repos/Johnson145/CameraView/languages","stargazers_url":"https://api.github.com/repos/Johnson145/CameraView/stargazers","contributors_url":"https://api.github.com/repos/Johnson145/CameraView/contributors","subscribers_url":"https://api.github.com/repos/Johnson145/CameraView/subscribers","subscription_url":"https://api.github.com/repos/Johnson145/CameraView/subscription","commits_url":"https://api.github.com/repos/Johnson145/CameraView/commits{/sha}","git_commits_url":"https://api.github.com/repos/Johnson145/CameraView/git/commits{/sha}","comments_url":"https://api.github.com/repos/Johnson145/CameraView/comments{/number}","issue_comment_url":"https://api.github.com/repos/Johnson145/CameraView/issues/comments{/number}","contents_url":"https://api.github.com/repos/Johnson145/CameraView/contents/{+path}","compare_url":"https://api.github.com/repos/Johnson145/CameraView/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Johnson145/CameraView/merges","archive_url":"https://api.github.com/repos/Johnson145/CameraView/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Johnson145/CameraView/downloads","issues_url":"https://api.github.com/repos/Johnson145/CameraView/issues{/number}","pulls_url":"https://api.github.com/repos/Johnson145/CameraView/pulls{/number}","milestones_url":"https://api.github.com/repos/Johnson145/CameraView/milestones{/number}","notifications_url":"https://api.github.com/repos/Johnson145/CameraView/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Johnson145/CameraView/labels{/name}","releases_url":"https://api.github.com/repos/Johnson145/CameraView/releases{/id}","deployments_url":"https://api.github.com/repos/Johnson145/CameraView/deployments","created_at":"2017-09-26T21:20:40Z","updated_at":"2017-09-26T21:20:42Z","pushed_at":"2017-10-05T13:57:07Z","git_url":"git://github.com/Johnson145/CameraView.git","ssh_url":"git@github.com:Johnson145/CameraView.git","clone_url":"https://github.com/Johnson145/CameraView.git","svn_url":"https://github.com/Johnson145/CameraView","homepage":"","size":22235,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"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":"natario1:master","ref":"master","sha":"129179ed484155c1c1859e198e227b40d739f100","user":{"login":"natario1","id":15526561,"avatar_url":"https://avatars2.githubusercontent.com/u/15526561?v=4","gravatar_id":"","url":"https://api.github.com/users/natario1","html_url":"https://github.com/natario1","followers_url":"https://api.github.com/users/natario1/followers","following_url":"https://api.github.com/users/natario1/following{/other_user}","gists_url":"https://api.github.com/users/natario1/gists{/gist_id}","starred_url":"https://api.github.com/users/natario1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natario1/subscriptions","organizations_url":"https://api.github.com/users/natario1/orgs","repos_url":"https://api.github.com/users/natario1/repos","events_url":"https://api.github.com/users/natario1/events{/privacy}","received_events_url":"https://api.github.com/users/natario1/received_events","type":"User","site_admin":false},"repo":{"id":97580115,"name":"CameraView","full_name":"natario1/CameraView","owner":{"login":"natario1","id":15526561,"avatar_url":"https://avatars2.githubusercontent.com/u/15526561?v=4","gravatar_id":"","url":"https://api.github.com/users/natario1","html_url":"https://github.com/natario1","followers_url":"https://api.github.com/users/natario1/followers","following_url":"https://api.github.com/users/natario1/following{/other_user}","gists_url":"https://api.github.com/users/natario1/gists{/gist_id}","starred_url":"https://api.github.com/users/natario1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natario1/subscriptions","organizations_url":"https://api.github.com/users/natario1/orgs","repos_url":"https://api.github.com/users/natario1/repos","events_url":"https://api.github.com/users/natario1/events{/privacy}","received_events_url":"https://api.github.com/users/natario1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/natario1/CameraView","description":"A well documented, high-level Android interface that makes capturing pictures and videos easy, addressing most of the common issues and needs.","fork":false,"url":"https://api.github.com/repos/natario1/CameraView","forks_url":"https://api.github.com/repos/natario1/CameraView/forks","keys_url":"https://api.github.com/repos/natario1/CameraView/keys{/key_id}","collaborators_url":"https://api.github.com/repos/natario1/CameraView/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/natario1/CameraView/teams","hooks_url":"https://api.github.com/repos/natario1/CameraView/hooks","issue_events_url":"https://api.github.com/repos/natario1/CameraView/issues/events{/number}","events_url":"https://api.github.com/repos/natario1/CameraView/events","assignees_url":"https://api.github.com/repos/natario1/CameraView/assignees{/user}","branches_url":"https://api.github.com/repos/natario1/CameraView/branches{/branch}","tags_url":"https://api.github.com/repos/natario1/CameraView/tags","blobs_url":"https://api.github.com/repos/natario1/CameraView/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/natario1/CameraView/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/natario1/CameraView/git/refs{/sha}","trees_url":"https://api.github.com/repos/natario1/CameraView/git/trees{/sha}","statuses_url":"https://api.github.com/repos/natario1/CameraView/statuses/{sha}","languages_url":"https://api.github.com/repos/natario1/CameraView/languages","stargazers_url":"https://api.github.com/repos/natario1/CameraView/stargazers","contributors_url":"https://api.github.com/repos/natario1/CameraView/contributors","subscribers_url":"https://api.github.com/repos/natario1/CameraView/subscribers","subscription_url":"https://api.github.com/repos/natario1/CameraView/subscription","commits_url":"https://api.github.com/repos/natario1/CameraView/commits{/sha}","git_commits_url":"https://api.github.com/repos/natario1/CameraView/git/commits{/sha}","comments_url":"https://api.github.com/repos/natario1/CameraView/comments{/number}","issue_comment_url":"https://api.github.com/repos/natario1/CameraView/issues/comments{/number}","contents_url":"https://api.github.com/repos/natario1/CameraView/contents/{+path}","compare_url":"https://api.github.com/repos/natario1/CameraView/compare/{base}...{head}","merges_url":"https://api.github.com/repos/natario1/CameraView/merges","archive_url":"https://api.github.com/repos/natario1/CameraView/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/natario1/CameraView/downloads","issues_url":"https://api.github.com/repos/natario1/CameraView/issues{/number}","pulls_url":"https://api.github.com/repos/natario1/CameraView/pulls{/number}","milestones_url":"https://api.github.com/repos/natario1/CameraView/milestones{/number}","notifications_url":"https://api.github.com/repos/natario1/CameraView/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/natario1/CameraView/labels{/name}","releases_url":"https://api.github.com/repos/natario1/CameraView/releases{/id}","deployments_url":"https://api.github.com/repos/natario1/CameraView/deployments","created_at":"2017-07-18T09:30:33Z","updated_at":"2017-10-03T13:10:32Z","pushed_at":"2017-10-05T14:11:54Z","git_url":"git://github.com/natario1/CameraView.git","ssh_url":"git@github.com:natario1/CameraView.git","clone_url":"https://github.com/natario1/CameraView.git","svn_url":"https://github.com/natario1/CameraView","homepage":"","size":22234,"stargazers_count":383,"watchers_count":383,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":18,"forks":51,"open_issues":18,"watchers":383,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/natario1/CameraView/pulls/59"},"html":{"href":"https://github.com/natario1/CameraView/pull/59"},"issue":{"href":"https://api.github.com/repos/natario1/CameraView/issues/59"},"comments":{"href":"https://api.github.com/repos/natario1/CameraView/issues/59/comments"},"review_comments":{"href":"https://api.github.com/repos/natario1/CameraView/pulls/59/comments"},"review_comment":{"href":"https://api.github.com/repos/natario1/CameraView/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/natario1/CameraView/pulls/59/commits"},"statuses":{"href":"https://api.github.com/repos/natario1/CameraView/statuses/8a168355600061f615f8cb49519a8193bb21fc76"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"natario1"}}