{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/leatherman/pulls/comments/135130104","pull_request_review_id":58509588,"id":135130104,"diff_hunk":"@@ -487,15 +491,30 @@ namespace leatherman { namespace curl {\n              REQUIRE_THROWS_WITH(test_client.download_file(req, file_path), \"easy perform failed\"); \n \n              // Ensure that the temp file was removed\n-             REQUIRE_THROWS_AS(find_matching_file(TEMP_FILE_REGEX), std::runtime_error);\n+             REQUIRE(fs::is_empty(temp_dir_path));\n          }\n \n-         SECTION(\"when curl_easy_perform fails and removal of the temporary file fails, then both the errbuf and the failed temporary file removal message are contained in the thrown http_file_download_exception\") {\n+         SECTION(\"when curl_easy_perform fails and removal of the temporary file fails, then both the errbuf and the failed temporary file removal message are contained in the thrown http_file_operation_exception\") {\n              std::string file_path = (temp_dir_path / \"file\").string();\n              curl::request req(\"\");\n              test_impl->test_failure_mode = curl_impl::error_mode::easy_perform_error; \n              test_impl->trigger_external_failure = setup_temp_removal_failure;\n              REQUIRE_THROWS_WITH(test_client.download_file(req, file_path), Catch::StartsWith(\"easy perform failed and failed to remove temporary file file_util_fixture_\")); \n          }\n+\n+         SECTION(\"when curl_easy_perform fails due to a CURLE_WRITE_ERROR, an http_file_operation_exception is thrown\") {","path":"curl/tests/client_test.cc","position":65,"original_position":65,"commit_id":"f6daa46da8708752d1262618b39530cb8949f1a5","original_commit_id":"f6daa46da8708752d1262618b39530cb8949f1a5","user":{"login":"ekinanp","id":29735501,"avatar_url":"https://avatars1.githubusercontent.com/u/29735501?v=4","gravatar_id":"","url":"https://api.github.com/users/ekinanp","html_url":"https://github.com/ekinanp","followers_url":"https://api.github.com/users/ekinanp/followers","following_url":"https://api.github.com/users/ekinanp/following{/other_user}","gists_url":"https://api.github.com/users/ekinanp/gists{/gist_id}","starred_url":"https://api.github.com/users/ekinanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekinanp/subscriptions","organizations_url":"https://api.github.com/users/ekinanp/orgs","repos_url":"https://api.github.com/users/ekinanp/repos","events_url":"https://api.github.com/users/ekinanp/events{/privacy}","received_events_url":"https://api.github.com/users/ekinanp/received_events","type":"User","site_admin":false},"body":"I'm wondering if for tests such as these, we should either:\r\n\r\n(1) Write file_download in a try-catch block w/ an http_file_operation_exception in the catch, and have a statement in there that requires the message to match what we want or\r\n\r\n(2) Create a custom matcher that ensures the thrown exception is the right type and it contains the message we want.\r\n\r\nFrom what I've seen, Catch doesn't provide a matcher that checks for both, it's either you check the type of exception thrown OR the message but not both. Unless I'm mistaken.","created_at":"2017-08-24T21:02:34Z","updated_at":"2017-08-24T21:02:34Z","html_url":"https://github.com/puppetlabs/leatherman/pull/254#discussion_r135130104","pull_request_url":"https://api.github.com/repos/puppetlabs/leatherman/pulls/254","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/leatherman/pulls/comments/135130104"},"html":{"href":"https://github.com/puppetlabs/leatherman/pull/254#discussion_r135130104"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/leatherman/pulls/254"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/leatherman/pulls/254","id":137550589,"html_url":"https://github.com/puppetlabs/leatherman/pull/254","diff_url":"https://github.com/puppetlabs/leatherman/pull/254.diff","patch_url":"https://github.com/puppetlabs/leatherman/pull/254.patch","issue_url":"https://api.github.com/repos/puppetlabs/leatherman/issues/254","number":254,"state":"open","locked":false,"title":"(LTH-142) Separate file operation errors from server-side errors","user":{"login":"ekinanp","id":29735501,"avatar_url":"https://avatars1.githubusercontent.com/u/29735501?v=4","gravatar_id":"","url":"https://api.github.com/users/ekinanp","html_url":"https://github.com/ekinanp","followers_url":"https://api.github.com/users/ekinanp/followers","following_url":"https://api.github.com/users/ekinanp/following{/other_user}","gists_url":"https://api.github.com/users/ekinanp/gists{/gist_id}","starred_url":"https://api.github.com/users/ekinanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekinanp/subscriptions","organizations_url":"https://api.github.com/users/ekinanp/orgs","repos_url":"https://api.github.com/users/ekinanp/repos","events_url":"https://api.github.com/users/ekinanp/events{/privacy}","received_events_url":"https://api.github.com/users/ekinanp/received_events","type":"User","site_admin":false},"body":"Previously, file operation errors (e.g. setting permissions,\r\nwriting to disk) were encapsulated the same way as server-side\r\nerrors in a single http_file_download_exception. This commit\r\ncreates a new exception for file operation errors,\r\nhttp_file_operation_exception, to distinguish these cases.","created_at":"2017-08-24T21:00:13Z","updated_at":"2017-08-24T21:02:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a520663497d1d6fb9b6de66d32a42806386861e7","assignee":null,"assignees":[],"requested_reviewers":[{"login":"MikaelSmith","id":8162496,"avatar_url":"https://avatars0.githubusercontent.com/u/8162496?v=4","gravatar_id":"","url":"https://api.github.com/users/MikaelSmith","html_url":"https://github.com/MikaelSmith","followers_url":"https://api.github.com/users/MikaelSmith/followers","following_url":"https://api.github.com/users/MikaelSmith/following{/other_user}","gists_url":"https://api.github.com/users/MikaelSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaelSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaelSmith/subscriptions","organizations_url":"https://api.github.com/users/MikaelSmith/orgs","repos_url":"https://api.github.com/users/MikaelSmith/repos","events_url":"https://api.github.com/users/MikaelSmith/events{/privacy}","received_events_url":"https://api.github.com/users/MikaelSmith/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/leatherman/pulls/254/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/leatherman/pulls/254/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/leatherman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/leatherman/issues/254/comments","statuses_url":"https://api.github.com/repos/puppetlabs/leatherman/statuses/f6daa46da8708752d1262618b39530cb8949f1a5","head":{"label":"ekinanp:LTH-142","ref":"LTH-142","sha":"f6daa46da8708752d1262618b39530cb8949f1a5","user":{"login":"ekinanp","id":29735501,"avatar_url":"https://avatars1.githubusercontent.com/u/29735501?v=4","gravatar_id":"","url":"https://api.github.com/users/ekinanp","html_url":"https://github.com/ekinanp","followers_url":"https://api.github.com/users/ekinanp/followers","following_url":"https://api.github.com/users/ekinanp/following{/other_user}","gists_url":"https://api.github.com/users/ekinanp/gists{/gist_id}","starred_url":"https://api.github.com/users/ekinanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekinanp/subscriptions","organizations_url":"https://api.github.com/users/ekinanp/orgs","repos_url":"https://api.github.com/users/ekinanp/repos","events_url":"https://api.github.com/users/ekinanp/events{/privacy}","received_events_url":"https://api.github.com/users/ekinanp/received_events","type":"User","site_admin":false},"repo":{"id":100632385,"name":"leatherman","full_name":"ekinanp/leatherman","owner":{"login":"ekinanp","id":29735501,"avatar_url":"https://avatars1.githubusercontent.com/u/29735501?v=4","gravatar_id":"","url":"https://api.github.com/users/ekinanp","html_url":"https://github.com/ekinanp","followers_url":"https://api.github.com/users/ekinanp/followers","following_url":"https://api.github.com/users/ekinanp/following{/other_user}","gists_url":"https://api.github.com/users/ekinanp/gists{/gist_id}","starred_url":"https://api.github.com/users/ekinanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekinanp/subscriptions","organizations_url":"https://api.github.com/users/ekinanp/orgs","repos_url":"https://api.github.com/users/ekinanp/repos","events_url":"https://api.github.com/users/ekinanp/events{/privacy}","received_events_url":"https://api.github.com/users/ekinanp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ekinanp/leatherman","description":"A collection of C++ and CMake utility libraries.","fork":true,"url":"https://api.github.com/repos/ekinanp/leatherman","forks_url":"https://api.github.com/repos/ekinanp/leatherman/forks","keys_url":"https://api.github.com/repos/ekinanp/leatherman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ekinanp/leatherman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ekinanp/leatherman/teams","hooks_url":"https://api.github.com/repos/ekinanp/leatherman/hooks","issue_events_url":"https://api.github.com/repos/ekinanp/leatherman/issues/events{/number}","events_url":"https://api.github.com/repos/ekinanp/leatherman/events","assignees_url":"https://api.github.com/repos/ekinanp/leatherman/assignees{/user}","branches_url":"https://api.github.com/repos/ekinanp/leatherman/branches{/branch}","tags_url":"https://api.github.com/repos/ekinanp/leatherman/tags","blobs_url":"https://api.github.com/repos/ekinanp/leatherman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ekinanp/leatherman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ekinanp/leatherman/git/refs{/sha}","trees_url":"https://api.github.com/repos/ekinanp/leatherman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ekinanp/leatherman/statuses/{sha}","languages_url":"https://api.github.com/repos/ekinanp/leatherman/languages","stargazers_url":"https://api.github.com/repos/ekinanp/leatherman/stargazers","contributors_url":"https://api.github.com/repos/ekinanp/leatherman/contributors","subscribers_url":"https://api.github.com/repos/ekinanp/leatherman/subscribers","subscription_url":"https://api.github.com/repos/ekinanp/leatherman/subscription","commits_url":"https://api.github.com/repos/ekinanp/leatherman/commits{/sha}","git_commits_url":"https://api.github.com/repos/ekinanp/leatherman/git/commits{/sha}","comments_url":"https://api.github.com/repos/ekinanp/leatherman/comments{/number}","issue_comment_url":"https://api.github.com/repos/ekinanp/leatherman/issues/comments{/number}","contents_url":"https://api.github.com/repos/ekinanp/leatherman/contents/{+path}","compare_url":"https://api.github.com/repos/ekinanp/leatherman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ekinanp/leatherman/merges","archive_url":"https://api.github.com/repos/ekinanp/leatherman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ekinanp/leatherman/downloads","issues_url":"https://api.github.com/repos/ekinanp/leatherman/issues{/number}","pulls_url":"https://api.github.com/repos/ekinanp/leatherman/pulls{/number}","milestones_url":"https://api.github.com/repos/ekinanp/leatherman/milestones{/number}","notifications_url":"https://api.github.com/repos/ekinanp/leatherman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ekinanp/leatherman/labels{/name}","releases_url":"https://api.github.com/repos/ekinanp/leatherman/releases{/id}","deployments_url":"https://api.github.com/repos/ekinanp/leatherman/deployments","created_at":"2017-08-17T18:14:53Z","updated_at":"2017-08-17T18:14:56Z","pushed_at":"2017-08-24T20:58:06Z","git_url":"git://github.com/ekinanp/leatherman.git","ssh_url":"git@github.com:ekinanp/leatherman.git","clone_url":"https://github.com/ekinanp/leatherman.git","svn_url":"https://github.com/ekinanp/leatherman","homepage":"","size":1353,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"puppetlabs:master","ref":"master","sha":"dcd281b0d090016b346a6c36e848f9f09273d686","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars0.githubusercontent.com/u/234268?v=4","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":31226286,"name":"leatherman","full_name":"puppetlabs/leatherman","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars0.githubusercontent.com/u/234268?v=4","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/leatherman","description":"A collection of C++ and CMake utility libraries.","fork":false,"url":"https://api.github.com/repos/puppetlabs/leatherman","forks_url":"https://api.github.com/repos/puppetlabs/leatherman/forks","keys_url":"https://api.github.com/repos/puppetlabs/leatherman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/leatherman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/leatherman/teams","hooks_url":"https://api.github.com/repos/puppetlabs/leatherman/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/leatherman/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/leatherman/events","assignees_url":"https://api.github.com/repos/puppetlabs/leatherman/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/leatherman/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/leatherman/tags","blobs_url":"https://api.github.com/repos/puppetlabs/leatherman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/leatherman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/leatherman/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/leatherman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/leatherman/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/leatherman/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/leatherman/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/leatherman/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/leatherman/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/leatherman/subscription","commits_url":"https://api.github.com/repos/puppetlabs/leatherman/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/leatherman/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/leatherman/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/leatherman/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/leatherman/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/leatherman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/leatherman/merges","archive_url":"https://api.github.com/repos/puppetlabs/leatherman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/leatherman/downloads","issues_url":"https://api.github.com/repos/puppetlabs/leatherman/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/leatherman/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/leatherman/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/leatherman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/leatherman/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/leatherman/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/leatherman/deployments","created_at":"2015-02-23T19:50:46Z","updated_at":"2017-08-20T02:35:03Z","pushed_at":"2017-08-24T21:00:14Z","git_url":"git://github.com/puppetlabs/leatherman.git","ssh_url":"git@github.com:puppetlabs/leatherman.git","clone_url":"https://github.com/puppetlabs/leatherman.git","svn_url":"https://github.com/puppetlabs/leatherman","homepage":"","size":1356,"stargazers_count":24,"watchers_count":24,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":6,"forks":41,"open_issues":6,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/leatherman/pulls/254"},"html":{"href":"https://github.com/puppetlabs/leatherman/pull/254"},"issue":{"href":"https://api.github.com/repos/puppetlabs/leatherman/issues/254"},"comments":{"href":"https://api.github.com/repos/puppetlabs/leatherman/issues/254/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/leatherman/pulls/254/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/leatherman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/leatherman/pulls/254/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/leatherman/statuses/f6daa46da8708752d1262618b39530cb8949f1a5"}}}}
{"actor":{"display_login":"ekinanp"}}