Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Commit

Permalink
HTTP: extend cpp-netlib exception patch to all platforms
Browse files Browse the repository at this point in the history
Closes #490 #453
  • Loading branch information
anonimal committed Dec 7, 2016
1 parent 4ce80e6 commit c8bbb2d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/client/util/http.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ bool HTTP::DownloadViaClearnet() {
}
// Create client with options
Client client(options);
#if defined(WIN32) // cpp-netlib/cpp-netlib#696
// TODO(unassigned): this top try block is specifically for Windows and ARMv8
// but is harmless for all platforms (see #453 and cpp-netlib/cpp-netlib#696)
try {
#endif
try {
// Create request
Request request(uri.string()); // A fully-qualified, completed URI
Expand Down Expand Up @@ -174,17 +174,14 @@ bool HTTP::DownloadViaClearnet() {
} catch (const std::exception& ex) {
LogPrint(eLogError, "HTTP: unable to complete download: ", ex.what());
return false;
}
#if defined(WIN32) // cpp-netlib/cpp-netlib#696
catch (const std::exception_ptr& ex) {
} catch (const std::exception_ptr& ex) {
LogPrint(eLogError, "HTTP: caught exception_ptr, rethrowing exception");
std::rethrow_exception(ex);
}
} catch (const boost::system::system_error& ex) {
LogPrint(eLogError, "HTTP: ", boost::diagnostic_information(ex));
return false;
}
#endif
return true;
}

Expand Down

0 comments on commit c8bbb2d

Please sign in to comment.