{"action":"created","comment":{"url":"https://api.github.com/repos/spockframework/spock/pulls/comments/46540601","id":46540601,"diff_hunk":"@@ -34,21 +34,44 @@ public static void verifyCondition(@Nullable ValueRecorder recorder,\n       @Nullable String text, int line, int column, @Nullable Object message, @Nullable Object condition) {\n     if (!GroovyRuntimeUtil.isTruthy(condition)) {\n       throw new ConditionNotSatisfiedError(\n-          new Condition(getValues(recorder), text, TextPosition.create(line, column), messageToString(message)));\n+          new Condition(getValues(recorder), text, TextPosition.create(line, column), messageToString(message), null, null));\n     }\n   }\n \n+  public static final String CONDITION_FAILED_WITH_EXCEPTION = \"conditionFailedWithException\";\n+\n+  public static void conditionFailedWithException(@Nullable ValueRecorder recorder, @Nullable String text, int line, int column, @Nullable Object message, Throwable throwable){\n+    if (throwable instanceof SpockAssertionError){\n+      throw (SpockAssertionError) throwable; // this is our exception - it already has good message\n+    }\n+    if (throwable instanceof SpockException){\n+      throw (SpockException) throwable; // this is our exception - it already has good message\n+    }\n+    throw new ConditionNotSatisfiedError(","path":"spock-core/src/main/java/org/spockframework/runtime/SpockRuntime.java","position":18,"original_position":18,"commit_id":"eabebbc09ce79e57b295d43a024223a234934892","original_commit_id":"eabebbc09ce79e57b295d43a024223a234934892","user":{"login":"Fuud","id":283980,"avatar_url":"https://avatars.githubusercontent.com/u/283980?v=3","gravatar_id":"","url":"https://api.github.com/users/Fuud","html_url":"https://github.com/Fuud","followers_url":"https://api.github.com/users/Fuud/followers","following_url":"https://api.github.com/users/Fuud/following{/other_user}","gists_url":"https://api.github.com/users/Fuud/gists{/gist_id}","starred_url":"https://api.github.com/users/Fuud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fuud/subscriptions","organizations_url":"https://api.github.com/users/Fuud/orgs","repos_url":"https://api.github.com/users/Fuud/repos","events_url":"https://api.github.com/users/Fuud/events{/privacy}","received_events_url":"https://api.github.com/users/Fuud/received_events","type":"User","site_admin":false},"body":"They will be converted to ConditionNotSatisfiedError. It is good for tests.","created_at":"2015-12-03T11:28:21Z","updated_at":"2015-12-03T11:28:21Z","html_url":"https://github.com/spockframework/spock/pull/549#discussion_r46540601","pull_request_url":"https://api.github.com/repos/spockframework/spock/pulls/549","_links":{"self":{"href":"https://api.github.com/repos/spockframework/spock/pulls/comments/46540601"},"html":{"href":"https://github.com/spockframework/spock/pull/549#discussion_r46540601"},"pull_request":{"href":"https://api.github.com/repos/spockframework/spock/pulls/549"}}},"pull_request":{"url":"https://api.github.com/repos/spockframework/spock/pulls/549","id":51209964,"html_url":"https://github.com/spockframework/spock/pull/549","diff_url":"https://github.com/spockframework/spock/pull/549.diff","patch_url":"https://github.com/spockframework/spock/pull/549.patch","issue_url":"https://api.github.com/repos/spockframework/spock/issues/549","number":549,"state":"open","locked":false,"title":"render exceptions in conditions as condition failure (copy of #49)","user":{"login":"Fuud","id":283980,"avatar_url":"https://avatars.githubusercontent.com/u/283980?v=3","gravatar_id":"","url":"https://api.github.com/users/Fuud","html_url":"https://github.com/Fuud","followers_url":"https://api.github.com/users/Fuud/followers","following_url":"https://api.github.com/users/Fuud/following{/other_user}","gists_url":"https://api.github.com/users/Fuud/gists{/gist_id}","starred_url":"https://api.github.com/users/Fuud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fuud/subscriptions","organizations_url":"https://api.github.com/users/Fuud/orgs","repos_url":"https://api.github.com/users/Fuud/repos","events_url":"https://api.github.com/users/Fuud/events{/privacy}","received_events_url":"https://api.github.com/users/Fuud/received_events","type":"User","site_admin":false},"body":"This pull request is copy of #49 but rebased on master.\r\nPlease post any questions/feedbacks to #49 to keep all in one place.","created_at":"2015-11-19T11:23:24Z","updated_at":"2015-12-03T11:28:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb3a347f4a580b96de7e3900ce0920e82e7354db","assignee":null,"milestone":{"url":"https://api.github.com/repos/spockframework/spock/milestones/1","html_url":"https://github.com/spockframework/spock/milestones/1.1","labels_url":"https://api.github.com/repos/spockframework/spock/milestones/1/labels","id":1220943,"number":1,"title":"1.1","description":"","creator":{"login":"leonard84","id":1151511,"avatar_url":"https://avatars.githubusercontent.com/u/1151511?v=3","gravatar_id":"","url":"https://api.github.com/users/leonard84","html_url":"https://github.com/leonard84","followers_url":"https://api.github.com/users/leonard84/followers","following_url":"https://api.github.com/users/leonard84/following{/other_user}","gists_url":"https://api.github.com/users/leonard84/gists{/gist_id}","starred_url":"https://api.github.com/users/leonard84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonard84/subscriptions","organizations_url":"https://api.github.com/users/leonard84/orgs","repos_url":"https://api.github.com/users/leonard84/repos","events_url":"https://api.github.com/users/leonard84/events{/privacy}","received_events_url":"https://api.github.com/users/leonard84/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":1,"state":"open","created_at":"2015-07-22T19:31:23Z","updated_at":"2015-11-30T20:48:26Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/spockframework/spock/pulls/549/commits","review_comments_url":"https://api.github.com/repos/spockframework/spock/pulls/549/comments","review_comment_url":"https://api.github.com/repos/spockframework/spock/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spockframework/spock/issues/549/comments","statuses_url":"https://api.github.com/repos/spockframework/spock/statuses/eabebbc09ce79e57b295d43a024223a234934892","head":{"label":"Fuud:exceptions-in-condition-as-condition-failure__over_spock_master","ref":"exceptions-in-condition-as-condition-failure__over_spock_master","sha":"eabebbc09ce79e57b295d43a024223a234934892","user":{"login":"Fuud","id":283980,"avatar_url":"https://avatars.githubusercontent.com/u/283980?v=3","gravatar_id":"","url":"https://api.github.com/users/Fuud","html_url":"https://github.com/Fuud","followers_url":"https://api.github.com/users/Fuud/followers","following_url":"https://api.github.com/users/Fuud/following{/other_user}","gists_url":"https://api.github.com/users/Fuud/gists{/gist_id}","starred_url":"https://api.github.com/users/Fuud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fuud/subscriptions","organizations_url":"https://api.github.com/users/Fuud/orgs","repos_url":"https://api.github.com/users/Fuud/repos","events_url":"https://api.github.com/users/Fuud/events{/privacy}","received_events_url":"https://api.github.com/users/Fuud/received_events","type":"User","site_admin":false},"repo":{"id":23491035,"name":"spock","full_name":"Fuud/spock","owner":{"login":"Fuud","id":283980,"avatar_url":"https://avatars.githubusercontent.com/u/283980?v=3","gravatar_id":"","url":"https://api.github.com/users/Fuud","html_url":"https://github.com/Fuud","followers_url":"https://api.github.com/users/Fuud/followers","following_url":"https://api.github.com/users/Fuud/following{/other_user}","gists_url":"https://api.github.com/users/Fuud/gists{/gist_id}","starred_url":"https://api.github.com/users/Fuud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fuud/subscriptions","organizations_url":"https://api.github.com/users/Fuud/orgs","repos_url":"https://api.github.com/users/Fuud/repos","events_url":"https://api.github.com/users/Fuud/events{/privacy}","received_events_url":"https://api.github.com/users/Fuud/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Fuud/spock","description":"The Enterprise-ready testing and specification framework.","fork":true,"url":"https://api.github.com/repos/Fuud/spock","forks_url":"https://api.github.com/repos/Fuud/spock/forks","keys_url":"https://api.github.com/repos/Fuud/spock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Fuud/spock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Fuud/spock/teams","hooks_url":"https://api.github.com/repos/Fuud/spock/hooks","issue_events_url":"https://api.github.com/repos/Fuud/spock/issues/events{/number}","events_url":"https://api.github.com/repos/Fuud/spock/events","assignees_url":"https://api.github.com/repos/Fuud/spock/assignees{/user}","branches_url":"https://api.github.com/repos/Fuud/spock/branches{/branch}","tags_url":"https://api.github.com/repos/Fuud/spock/tags","blobs_url":"https://api.github.com/repos/Fuud/spock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Fuud/spock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Fuud/spock/git/refs{/sha}","trees_url":"https://api.github.com/repos/Fuud/spock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Fuud/spock/statuses/{sha}","languages_url":"https://api.github.com/repos/Fuud/spock/languages","stargazers_url":"https://api.github.com/repos/Fuud/spock/stargazers","contributors_url":"https://api.github.com/repos/Fuud/spock/contributors","subscribers_url":"https://api.github.com/repos/Fuud/spock/subscribers","subscription_url":"https://api.github.com/repos/Fuud/spock/subscription","commits_url":"https://api.github.com/repos/Fuud/spock/commits{/sha}","git_commits_url":"https://api.github.com/repos/Fuud/spock/git/commits{/sha}","comments_url":"https://api.github.com/repos/Fuud/spock/comments{/number}","issue_comment_url":"https://api.github.com/repos/Fuud/spock/issues/comments{/number}","contents_url":"https://api.github.com/repos/Fuud/spock/contents/{+path}","compare_url":"https://api.github.com/repos/Fuud/spock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Fuud/spock/merges","archive_url":"https://api.github.com/repos/Fuud/spock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Fuud/spock/downloads","issues_url":"https://api.github.com/repos/Fuud/spock/issues{/number}","pulls_url":"https://api.github.com/repos/Fuud/spock/pulls{/number}","milestones_url":"https://api.github.com/repos/Fuud/spock/milestones{/number}","notifications_url":"https://api.github.com/repos/Fuud/spock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Fuud/spock/labels{/name}","releases_url":"https://api.github.com/repos/Fuud/spock/releases{/id}","created_at":"2014-08-30T12:12:32Z","updated_at":"2014-08-30T15:35:43Z","pushed_at":"2015-12-03T11:00:01Z","git_url":"git://github.com/Fuud/spock.git","ssh_url":"git@github.com:Fuud/spock.git","clone_url":"https://github.com/Fuud/spock.git","svn_url":"https://github.com/Fuud/spock","homepage":"http://spockframework.org","size":8802,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"groovy-1.8"}},"base":{"label":"spockframework:master","ref":"master","sha":"805fd773231bb8cd930ca59fa34fd9b864843dd5","user":{"login":"spockframework","id":297723,"avatar_url":"https://avatars.githubusercontent.com/u/297723?v=3","gravatar_id":"","url":"https://api.github.com/users/spockframework","html_url":"https://github.com/spockframework","followers_url":"https://api.github.com/users/spockframework/followers","following_url":"https://api.github.com/users/spockframework/following{/other_user}","gists_url":"https://api.github.com/users/spockframework/gists{/gist_id}","starred_url":"https://api.github.com/users/spockframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spockframework/subscriptions","organizations_url":"https://api.github.com/users/spockframework/orgs","repos_url":"https://api.github.com/users/spockframework/repos","events_url":"https://api.github.com/users/spockframework/events{/privacy}","received_events_url":"https://api.github.com/users/spockframework/received_events","type":"Organization","site_admin":false},"repo":{"id":1161862,"name":"spock","full_name":"spockframework/spock","owner":{"login":"spockframework","id":297723,"avatar_url":"https://avatars.githubusercontent.com/u/297723?v=3","gravatar_id":"","url":"https://api.github.com/users/spockframework","html_url":"https://github.com/spockframework","followers_url":"https://api.github.com/users/spockframework/followers","following_url":"https://api.github.com/users/spockframework/following{/other_user}","gists_url":"https://api.github.com/users/spockframework/gists{/gist_id}","starred_url":"https://api.github.com/users/spockframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spockframework/subscriptions","organizations_url":"https://api.github.com/users/spockframework/orgs","repos_url":"https://api.github.com/users/spockframework/repos","events_url":"https://api.github.com/users/spockframework/events{/privacy}","received_events_url":"https://api.github.com/users/spockframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spockframework/spock","description":"The Enterprise-ready testing and specification framework.","fork":false,"url":"https://api.github.com/repos/spockframework/spock","forks_url":"https://api.github.com/repos/spockframework/spock/forks","keys_url":"https://api.github.com/repos/spockframework/spock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spockframework/spock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spockframework/spock/teams","hooks_url":"https://api.github.com/repos/spockframework/spock/hooks","issue_events_url":"https://api.github.com/repos/spockframework/spock/issues/events{/number}","events_url":"https://api.github.com/repos/spockframework/spock/events","assignees_url":"https://api.github.com/repos/spockframework/spock/assignees{/user}","branches_url":"https://api.github.com/repos/spockframework/spock/branches{/branch}","tags_url":"https://api.github.com/repos/spockframework/spock/tags","blobs_url":"https://api.github.com/repos/spockframework/spock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spockframework/spock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spockframework/spock/git/refs{/sha}","trees_url":"https://api.github.com/repos/spockframework/spock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spockframework/spock/statuses/{sha}","languages_url":"https://api.github.com/repos/spockframework/spock/languages","stargazers_url":"https://api.github.com/repos/spockframework/spock/stargazers","contributors_url":"https://api.github.com/repos/spockframework/spock/contributors","subscribers_url":"https://api.github.com/repos/spockframework/spock/subscribers","subscription_url":"https://api.github.com/repos/spockframework/spock/subscription","commits_url":"https://api.github.com/repos/spockframework/spock/commits{/sha}","git_commits_url":"https://api.github.com/repos/spockframework/spock/git/commits{/sha}","comments_url":"https://api.github.com/repos/spockframework/spock/comments{/number}","issue_comment_url":"https://api.github.com/repos/spockframework/spock/issues/comments{/number}","contents_url":"https://api.github.com/repos/spockframework/spock/contents/{+path}","compare_url":"https://api.github.com/repos/spockframework/spock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spockframework/spock/merges","archive_url":"https://api.github.com/repos/spockframework/spock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spockframework/spock/downloads","issues_url":"https://api.github.com/repos/spockframework/spock/issues{/number}","pulls_url":"https://api.github.com/repos/spockframework/spock/pulls{/number}","milestones_url":"https://api.github.com/repos/spockframework/spock/milestones{/number}","notifications_url":"https://api.github.com/repos/spockframework/spock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spockframework/spock/labels{/name}","releases_url":"https://api.github.com/repos/spockframework/spock/releases{/id}","created_at":"2010-12-12T19:02:34Z","updated_at":"2015-12-02T23:04:22Z","pushed_at":"2015-12-03T11:04:21Z","git_url":"git://github.com/spockframework/spock.git","ssh_url":"git@github.com:spockframework/spock.git","clone_url":"https://github.com/spockframework/spock.git","svn_url":"https://github.com/spockframework/spock","homepage":"http://spockframework.org","size":16438,"stargazers_count":873,"watchers_count":873,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":171,"mirror_url":null,"open_issues_count":177,"forks":171,"open_issues":177,"watchers":873,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spockframework/spock/pulls/549"},"html":{"href":"https://github.com/spockframework/spock/pull/549"},"issue":{"href":"https://api.github.com/repos/spockframework/spock/issues/549"},"comments":{"href":"https://api.github.com/repos/spockframework/spock/issues/549/comments"},"review_comments":{"href":"https://api.github.com/repos/spockframework/spock/pulls/549/comments"},"review_comment":{"href":"https://api.github.com/repos/spockframework/spock/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spockframework/spock/pulls/549/commits"},"statuses":{"href":"https://api.github.com/repos/spockframework/spock/statuses/eabebbc09ce79e57b295d43a024223a234934892"}}}}