Skip to content

Commit

Permalink
Merge pull request #3062 from STEllAR-GROUP/fixing_exceptions_seq
Browse files Browse the repository at this point in the history
Fix exception handling for execution::seq
  • Loading branch information
hkaiser committed Dec 31, 2017
2 parents e2fb61c + 999a816 commit a5ac8fc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion hpx/parallel/algorithms/detail/dispatch.hpp
Expand Up @@ -124,7 +124,8 @@ namespace hpx { namespace parallel { inline namespace v1 { namespace detail
}
catch(...) {
// this does not return
return detail::handle_exception<ExPolicy, local_result_type>::call();
return detail::handle_exception<ExPolicy,
local_result_type>::call();
}
#endif
}
Expand Down Expand Up @@ -163,6 +164,9 @@ namespace hpx { namespace parallel { inline namespace v1 { namespace detail
return call_execute(std::forward<ExPolicy>(policy),
is_void(), std::forward<Args>(args)...);
}
catch (std::bad_alloc const& ba) {
throw ba;
}
catch (...) {
return detail::handle_exception<ExPolicy, local_result_type>::
call();
Expand All @@ -187,6 +191,9 @@ namespace hpx { namespace parallel { inline namespace v1 { namespace detail
ExPolicy, local_result_type
>::get(std::move(result));
}
catch (std::bad_alloc const& ba) {
throw ba;
}
catch (...) {
return detail::handle_exception<ExPolicy, local_result_type>::
call();
Expand Down

0 comments on commit a5ac8fc

Please sign in to comment.