{"action":"created","comment":{"url":"https://api.github.com/repos/magnetis/caze/pulls/comments/43451160","id":43451160,"diff_hunk":"@@ -57,6 +57,22 @@ Note that the transaction handler must implement `#transaction` and\n return the value inside the block. It will also be responsible for handle errors\n and rollback if necessary.\n \n+\n+## Using exception interceptor\n+\n+You can use the exception interceptor in your use case by providing a `intercept_exceptions`\n+in your module in order to intercept errors and write the use case name on it.\n+\n+While declaring which use case your app has, you can set the option\n+`intercept_exceptions` to `true`.","path":"README.md","position":11,"original_position":11,"commit_id":"6b2b33d1ab9408120751e42599113d0a9d85d94c","original_commit_id":"ca532eef86cdbb3e82d9ba379314de39a35e8435","user":{"login":"Lucasosf","id":2293178,"avatar_url":"https://avatars.githubusercontent.com/u/2293178?v=3","gravatar_id":"","url":"https://api.github.com/users/Lucasosf","html_url":"https://github.com/Lucasosf","followers_url":"https://api.github.com/users/Lucasosf/followers","following_url":"https://api.github.com/users/Lucasosf/following{/other_user}","gists_url":"https://api.github.com/users/Lucasosf/gists{/gist_id}","starred_url":"https://api.github.com/users/Lucasosf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lucasosf/subscriptions","organizations_url":"https://api.github.com/users/Lucasosf/orgs","repos_url":"https://api.github.com/users/Lucasosf/repos","events_url":"https://api.github.com/users/Lucasosf/events{/privacy}","received_events_url":"https://api.github.com/users/Lucasosf/received_events","type":"User","site_admin":false},"body":"I see. I liked of this references, so I agree to use `exceptional `. Do you agree too? @brunojabs ","created_at":"2015-10-29T22:09:18Z","updated_at":"2015-10-29T22:09:18Z","html_url":"https://github.com/magnetis/caze/pull/10#discussion_r43451160","pull_request_url":"https://api.github.com/repos/magnetis/caze/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/magnetis/caze/pulls/comments/43451160"},"html":{"href":"https://github.com/magnetis/caze/pull/10#discussion_r43451160"},"pull_request":{"href":"https://api.github.com/repos/magnetis/caze/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/magnetis/caze/pulls/10","id":49146786,"html_url":"https://github.com/magnetis/caze/pull/10","diff_url":"https://github.com/magnetis/caze/pull/10.diff","patch_url":"https://github.com/magnetis/caze/pull/10.patch","issue_url":"https://api.github.com/repos/magnetis/caze/issues/10","number":10,"state":"open","locked":false,"title":"Exceptions/interceptor","user":{"login":"Lucasosf","id":2293178,"avatar_url":"https://avatars.githubusercontent.com/u/2293178?v=3","gravatar_id":"","url":"https://api.github.com/users/Lucasosf","html_url":"https://github.com/Lucasosf","followers_url":"https://api.github.com/users/Lucasosf/followers","following_url":"https://api.github.com/users/Lucasosf/following{/other_user}","gists_url":"https://api.github.com/users/Lucasosf/gists{/gist_id}","starred_url":"https://api.github.com/users/Lucasosf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lucasosf/subscriptions","organizations_url":"https://api.github.com/users/Lucasosf/orgs","repos_url":"https://api.github.com/users/Lucasosf/repos","events_url":"https://api.github.com/users/Lucasosf/events{/privacy}","received_events_url":"https://api.github.com/users/Lucasosf/received_events","type":"User","site_admin":false},"body":"This PR adds an interceptor to handle exceptions raised in order to add the use case name on it.\r\n\r\ncard: https://trello.com/c/hgGXKeB5/3100-brokerservice-specific-error-for-each-use-case\r\nIt' part of the card, because there are some code to be done into the app.","created_at":"2015-10-29T14:31:30Z","updated_at":"2015-10-29T22:09:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3da26097c0d2005d394768800fb5dc90df29b74c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/magnetis/caze/pulls/10/commits","review_comments_url":"https://api.github.com/repos/magnetis/caze/pulls/10/comments","review_comment_url":"https://api.github.com/repos/magnetis/caze/pulls/comments{/number}","comments_url":"https://api.github.com/repos/magnetis/caze/issues/10/comments","statuses_url":"https://api.github.com/repos/magnetis/caze/statuses/6b2b33d1ab9408120751e42599113d0a9d85d94c","head":{"label":"magnetis:exceptions/interceptor","ref":"exceptions/interceptor","sha":"6b2b33d1ab9408120751e42599113d0a9d85d94c","user":{"login":"magnetis","id":1625659,"avatar_url":"https://avatars.githubusercontent.com/u/1625659?v=3","gravatar_id":"","url":"https://api.github.com/users/magnetis","html_url":"https://github.com/magnetis","followers_url":"https://api.github.com/users/magnetis/followers","following_url":"https://api.github.com/users/magnetis/following{/other_user}","gists_url":"https://api.github.com/users/magnetis/gists{/gist_id}","starred_url":"https://api.github.com/users/magnetis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnetis/subscriptions","organizations_url":"https://api.github.com/users/magnetis/orgs","repos_url":"https://api.github.com/users/magnetis/repos","events_url":"https://api.github.com/users/magnetis/events{/privacy}","received_events_url":"https://api.github.com/users/magnetis/received_events","type":"Organization","site_admin":false},"repo":{"id":30354399,"name":"caze","full_name":"magnetis/caze","owner":{"login":"magnetis","id":1625659,"avatar_url":"https://avatars.githubusercontent.com/u/1625659?v=3","gravatar_id":"","url":"https://api.github.com/users/magnetis","html_url":"https://github.com/magnetis","followers_url":"https://api.github.com/users/magnetis/followers","following_url":"https://api.github.com/users/magnetis/following{/other_user}","gists_url":"https://api.github.com/users/magnetis/gists{/gist_id}","starred_url":"https://api.github.com/users/magnetis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnetis/subscriptions","organizations_url":"https://api.github.com/users/magnetis/orgs","repos_url":"https://api.github.com/users/magnetis/repos","events_url":"https://api.github.com/users/magnetis/events{/privacy}","received_events_url":"https://api.github.com/users/magnetis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/magnetis/caze","description":"A DSL to define use cases","fork":false,"url":"https://api.github.com/repos/magnetis/caze","forks_url":"https://api.github.com/repos/magnetis/caze/forks","keys_url":"https://api.github.com/repos/magnetis/caze/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magnetis/caze/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magnetis/caze/teams","hooks_url":"https://api.github.com/repos/magnetis/caze/hooks","issue_events_url":"https://api.github.com/repos/magnetis/caze/issues/events{/number}","events_url":"https://api.github.com/repos/magnetis/caze/events","assignees_url":"https://api.github.com/repos/magnetis/caze/assignees{/user}","branches_url":"https://api.github.com/repos/magnetis/caze/branches{/branch}","tags_url":"https://api.github.com/repos/magnetis/caze/tags","blobs_url":"https://api.github.com/repos/magnetis/caze/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magnetis/caze/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magnetis/caze/git/refs{/sha}","trees_url":"https://api.github.com/repos/magnetis/caze/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magnetis/caze/statuses/{sha}","languages_url":"https://api.github.com/repos/magnetis/caze/languages","stargazers_url":"https://api.github.com/repos/magnetis/caze/stargazers","contributors_url":"https://api.github.com/repos/magnetis/caze/contributors","subscribers_url":"https://api.github.com/repos/magnetis/caze/subscribers","subscription_url":"https://api.github.com/repos/magnetis/caze/subscription","commits_url":"https://api.github.com/repos/magnetis/caze/commits{/sha}","git_commits_url":"https://api.github.com/repos/magnetis/caze/git/commits{/sha}","comments_url":"https://api.github.com/repos/magnetis/caze/comments{/number}","issue_comment_url":"https://api.github.com/repos/magnetis/caze/issues/comments{/number}","contents_url":"https://api.github.com/repos/magnetis/caze/contents/{+path}","compare_url":"https://api.github.com/repos/magnetis/caze/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magnetis/caze/merges","archive_url":"https://api.github.com/repos/magnetis/caze/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magnetis/caze/downloads","issues_url":"https://api.github.com/repos/magnetis/caze/issues{/number}","pulls_url":"https://api.github.com/repos/magnetis/caze/pulls{/number}","milestones_url":"https://api.github.com/repos/magnetis/caze/milestones{/number}","notifications_url":"https://api.github.com/repos/magnetis/caze/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magnetis/caze/labels{/name}","releases_url":"https://api.github.com/repos/magnetis/caze/releases{/id}","created_at":"2015-02-05T12:29:35Z","updated_at":"2015-09-19T18:33:34Z","pushed_at":"2015-10-29T22:04:57Z","git_url":"git://github.com/magnetis/caze.git","ssh_url":"git@github.com:magnetis/caze.git","clone_url":"https://github.com/magnetis/caze.git","svn_url":"https://github.com/magnetis/caze","homepage":null,"size":293,"stargazers_count":9,"watchers_count":9,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":9,"default_branch":"master"}},"base":{"label":"magnetis:master","ref":"master","sha":"b508c9e09b9e7886d783030335a8afe79530e8fa","user":{"login":"magnetis","id":1625659,"avatar_url":"https://avatars.githubusercontent.com/u/1625659?v=3","gravatar_id":"","url":"https://api.github.com/users/magnetis","html_url":"https://github.com/magnetis","followers_url":"https://api.github.com/users/magnetis/followers","following_url":"https://api.github.com/users/magnetis/following{/other_user}","gists_url":"https://api.github.com/users/magnetis/gists{/gist_id}","starred_url":"https://api.github.com/users/magnetis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnetis/subscriptions","organizations_url":"https://api.github.com/users/magnetis/orgs","repos_url":"https://api.github.com/users/magnetis/repos","events_url":"https://api.github.com/users/magnetis/events{/privacy}","received_events_url":"https://api.github.com/users/magnetis/received_events","type":"Organization","site_admin":false},"repo":{"id":30354399,"name":"caze","full_name":"magnetis/caze","owner":{"login":"magnetis","id":1625659,"avatar_url":"https://avatars.githubusercontent.com/u/1625659?v=3","gravatar_id":"","url":"https://api.github.com/users/magnetis","html_url":"https://github.com/magnetis","followers_url":"https://api.github.com/users/magnetis/followers","following_url":"https://api.github.com/users/magnetis/following{/other_user}","gists_url":"https://api.github.com/users/magnetis/gists{/gist_id}","starred_url":"https://api.github.com/users/magnetis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnetis/subscriptions","organizations_url":"https://api.github.com/users/magnetis/orgs","repos_url":"https://api.github.com/users/magnetis/repos","events_url":"https://api.github.com/users/magnetis/events{/privacy}","received_events_url":"https://api.github.com/users/magnetis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/magnetis/caze","description":"A DSL to define use cases","fork":false,"url":"https://api.github.com/repos/magnetis/caze","forks_url":"https://api.github.com/repos/magnetis/caze/forks","keys_url":"https://api.github.com/repos/magnetis/caze/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magnetis/caze/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magnetis/caze/teams","hooks_url":"https://api.github.com/repos/magnetis/caze/hooks","issue_events_url":"https://api.github.com/repos/magnetis/caze/issues/events{/number}","events_url":"https://api.github.com/repos/magnetis/caze/events","assignees_url":"https://api.github.com/repos/magnetis/caze/assignees{/user}","branches_url":"https://api.github.com/repos/magnetis/caze/branches{/branch}","tags_url":"https://api.github.com/repos/magnetis/caze/tags","blobs_url":"https://api.github.com/repos/magnetis/caze/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magnetis/caze/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magnetis/caze/git/refs{/sha}","trees_url":"https://api.github.com/repos/magnetis/caze/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magnetis/caze/statuses/{sha}","languages_url":"https://api.github.com/repos/magnetis/caze/languages","stargazers_url":"https://api.github.com/repos/magnetis/caze/stargazers","contributors_url":"https://api.github.com/repos/magnetis/caze/contributors","subscribers_url":"https://api.github.com/repos/magnetis/caze/subscribers","subscription_url":"https://api.github.com/repos/magnetis/caze/subscription","commits_url":"https://api.github.com/repos/magnetis/caze/commits{/sha}","git_commits_url":"https://api.github.com/repos/magnetis/caze/git/commits{/sha}","comments_url":"https://api.github.com/repos/magnetis/caze/comments{/number}","issue_comment_url":"https://api.github.com/repos/magnetis/caze/issues/comments{/number}","contents_url":"https://api.github.com/repos/magnetis/caze/contents/{+path}","compare_url":"https://api.github.com/repos/magnetis/caze/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magnetis/caze/merges","archive_url":"https://api.github.com/repos/magnetis/caze/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magnetis/caze/downloads","issues_url":"https://api.github.com/repos/magnetis/caze/issues{/number}","pulls_url":"https://api.github.com/repos/magnetis/caze/pulls{/number}","milestones_url":"https://api.github.com/repos/magnetis/caze/milestones{/number}","notifications_url":"https://api.github.com/repos/magnetis/caze/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magnetis/caze/labels{/name}","releases_url":"https://api.github.com/repos/magnetis/caze/releases{/id}","created_at":"2015-02-05T12:29:35Z","updated_at":"2015-09-19T18:33:34Z","pushed_at":"2015-10-29T22:04:57Z","git_url":"git://github.com/magnetis/caze.git","ssh_url":"git@github.com:magnetis/caze.git","clone_url":"https://github.com/magnetis/caze.git","svn_url":"https://github.com/magnetis/caze","homepage":null,"size":293,"stargazers_count":9,"watchers_count":9,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/magnetis/caze/pulls/10"},"html":{"href":"https://github.com/magnetis/caze/pull/10"},"issue":{"href":"https://api.github.com/repos/magnetis/caze/issues/10"},"comments":{"href":"https://api.github.com/repos/magnetis/caze/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/magnetis/caze/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/magnetis/caze/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/magnetis/caze/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/magnetis/caze/statuses/6b2b33d1ab9408120751e42599113d0a9d85d94c"}}}}