MCPcopy Create free account
hub / github.com/boostorg/leaf / unpack_error_id

Function unpack_error_id

include/boost/leaf/handle_errors.hpp:20–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18namespace detail
19{
20 inline error_id unpack_error_id(std::exception const & ex) noexcept
21 {
22 if( detail::exception_base const * eb = dynamic_cast<detail::exception_base const *>(&ex) )
23 return eb->get_error_id();
24 if( error_id const * err_id = dynamic_cast<error_id const *>(&ex) )
25 return *err_id;
26 return current_error();
27 }
28}
29
30#endif // #ifndef BOOST_LEAF_NO_EXCEPTIONS

Callers 4

try_catch_Function · 0.85
try_catchFunction · 0.85
catchMethod · 0.85
catchMethod · 0.85

Calls 2

current_errorFunction · 0.85
get_error_idMethod · 0.45

Tested by

no test coverage detected