Skip to content

Fix exception propagation for client errors #754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

deanberris
Copy link
Member

We change the cross-thread exception propagation given the asynchronous
client implementation. The previous implementation caused
double-wrapping of exceptions which works with the
std::shared_future<...> implementation, but not with
boost::shared_future<...> -- since Boost.Thread still uses
Boost.Exception for the APIs.

While we're here we make the exception propagation more explicit using
boost::rethrow_exception(...), so we can unwrap the exception that's
transported via an exception_ptr.

Fixes #749.

We change the cross-thread exception propagation given the asynchronous
client implementation. The previous implementation caused
double-wrapping of exceptions which works with the
std::shared_future<...> implementation, but not with
boost::shared_future<...> -- since Boost.Thread still uses
Boost.Exception for the APIs.

While we're here we make the exception propagation more explicit using
boost::rethrow_exception(...), so we can unwrap the exception that's
transported via an exception_ptr.

Fixes #749.
@deanberris deanberris changed the title Fix exception propaation for client errors Fix exception propagation for client errors Apr 7, 2017
@deanberris
Copy link
Member Author

I'm merging this -- the GCC builds seem fine, I'll look to see whether I can reproduce the clang build failures in isolation.

@deanberris deanberris merged commit 610c8cb into cpp-netlib:master Apr 7, 2017
@deanberris deanberris deleted the fix/http-client-error-propagation-749 branch April 7, 2017 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant