File holding helper for xrt_result_t results.
More...
Go to the source code of this file.
|
| #define | OXR_CHECK_XRET(LOG, SESS, RESULTS, FUNCTION) |
| | Helper define to check results from 'xrt_` functions (xrt_result_t) and also set any needed state. More...
|
| |
| #define | OXR_CHECK_XRET_ALWAYS_RET(LOG, SESS, RESULTS, FUNCTION) |
| |
| #define | OXR_CHECK_XRET_GOTO(LOG, SESS, RESULTS, FUNCTION, XR_RES, GOTO_LABEL) |
| |
◆ OXR_CHECK_XRET_ALWAYS_RET
| #define OXR_CHECK_XRET_ALWAYS_RET |
( |
|
LOG, |
|
|
|
SESS, |
|
|
|
RESULTS, |
|
|
|
FUNCTION |
|
) |
| |
Value: do { \
OXR_CHECK_XRET(LOG, SESS, RESULTS, FUNCTION); \
return XR_SUCCESS; \
} while (false)
◆ OXR_CHECK_XRET_GOTO
| #define OXR_CHECK_XRET_GOTO |
( |
|
LOG, |
|
|
|
SESS, |
|
|
|
RESULTS, |
|
|
|
FUNCTION, |
|
|
|
XR_RES, |
|
|
|
GOTO_LABEL |
|
) |
| |
Value: do { \
xrt_result_t check_ret = (RESULTS); \
(SESS)->has_lost = true; \
XR_RES =
oxr_error(LOG, XR_ERROR_INSTANCE_LOST,
"Call to " #FUNCTION
" failed"); \
goto GOTO_LABEL; \
} \
XR_RES =
oxr_error(LOG, XR_ERROR_RUNTIME_FAILURE,
"Call to " #FUNCTION
" failed"); \
goto GOTO_LABEL; \
} \
} while (false)
@ XRT_SUCCESS
The operation succeeded.
Definition: xrt_results.h:27
@ XRT_ERROR_IPC_FAILURE
A problem occurred either with the IPC transport itself, with invalid commands from the client,...
Definition: xrt_results.h:50
XrResult oxr_error(struct oxr_logger *logger, XrResult result, const char *fmt,...)
Definition: oxr_logger.c:203