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

Function import_error_code

include/boost/leaf/error.hpp:642–661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

640 leaf_error_category get_leaf_error_category<T>::cat;
641
642 inline int import_error_code( std::error_code const & ec ) noexcept(!BOOST_LEAF_CFG_CAPTURE)
643 {
644 if( int err_id = ec.value() )
645 {
646 std::error_category const & cat = get_leaf_error_category<>::cat;
647 if( &ec.category() == &cat )
648 {
649 BOOST_LEAF_ASSERT((err_id&3) == 1);
650 return (err_id&~3)|1;
651 }
652 else
653 {
654 err_id = start_new_error();
655 (void) load_slot(err_id, ec);
656 return (err_id&~3)|1;
657 }
658 }
659 else
660 return 0;
661 }
662} // namespace detail
663
664inline bool is_error_id( std::error_code const & ec ) noexcept

Callers 1

error_idMethod · 0.85

Calls 3

start_new_errorFunction · 0.85
load_slotFunction · 0.85
valueMethod · 0.45

Tested by

no test coverage detected