XRTraits C++ OpenXR Utilities
|
Namespace for custom exception types that may be thrown internal to the utilities. More...
Classes | |
struct | bad_tagged_cast |
struct | get_from_chain_error |
struct | type_error |
class | xr_exception |
struct | xr_logic_error |
struct | xr_runtime_error |
Functions | |
void | throwIfNotSucceeded (XrResult result, const char *errorMessage) |
void | throwIfNotUnqualifiedSuccess (XrResult result, const char *errorMessage) |
Namespace for custom exception types that may be thrown internal to the utilities.
Note that these declarations (as well as any possibly-throwing functionality elsewhere in the library) are only available if XRTRAITS_USE_EXCEPTIONS
is defined and the source files compiled. Without that flag, the source files are not needed, and exceptions are not explicitly thrown.
void xrtraits::exceptions::throwIfNotSucceeded | ( | XrResult | result, |
const char * | errorMessage | ||
) |
Throw an xr_runtime_error with the given message if the result fails XR_SUCCEEDED.
Particularly useful for application-side utilities to allow non-XrResult return values in the usual case.
void xrtraits::exceptions::throwIfNotUnqualifiedSuccess | ( | XrResult | result, |
const char * | errorMessage | ||
) |
Throw an xr_runtime_error with the given message if the result fails XR_UNQUALIFIED_SUCCESS.
That is, if result is not exactly XR_SUCCESS.
Particularly useful for application-side utilities to allow non-XrResult return values in the usual case.
Referenced by xrtraits::doTwoCall(), and xrtraits::doTwoCallWithSizeHint().