HPX_ATTRIBUTE_NORETURN void rethrow_exception( exception const& e, std::string const& func) { hpx::detail::throw_exception( hpx::exception(e.get_error(), e.what(), hpx::rethrow), func, hpx::get_error_file_name(e), hpx::get_error_line_number(e)); }
void rethrows_if( hpx::error_code& ec, exception const& e, std::string const& func) { if (&ec == &hpx::throws) { hpx::detail::rethrow_exception(e, func); } else { ec = make_error_code(e.get_error(), e.what(), func.c_str(), hpx::get_error_file_name(e).c_str(), hpx::get_error_line_number(e), (ec.category() == hpx::get_lightweight_hpx_category()) ? hpx::lightweight_rethrow : hpx::rethrow); } }