hpx/errors/exception_fwd.hpp

See Public API for a list of names and headers that are part of the public HPX API.

Defines

HPX_THROWMODE_UNSCOPED_ENUM_DEPRECATION_MSG
namespace hpx

Enums

enum throwmode

Encode error category for new error_code.

Values:

plain = 0
rethrow = 1
lightweight = 0x80

Functions

constexpr bool operator&(throwmode lhs, throwmode rhs)

Variables

constexpr throwmode plain = throwmode::plain
constexpr throwmode rethrow = throwmode::rethrow
constexpr throwmode lightweight = throwmode::lightweight
constexpr throwmode lightweight_rethrow = throwmode::lightweight_rethrow
error_code throws

Predefined error_code object used as “throw on error” tag.

The predefined hpx::error_code object hpx::throws is supplied for use as a “throw on error” tag.

Functions that specify an argument in the form ‘error_code& ec=throws’ (with appropriate namespace qualifiers), have the following error handling semantics:

If &ec != &throws and an error occurred: ec.value() returns the implementation specific error number for the particular error that occurred and ec.category() returns the error_category for ec.value().

If &ec != &throws and an error did not occur, ec.clear().

If an error occurs and &ec == &throws, the function throws an exception of type hpx::exception or of a type derived from it. The exception’s get_errorcode() member function returns a reference to an hpx::error_code object with the behavior as specified above.