Error Handling
Functions Index
| static QarResult | qar_error_wrap_result (QarResult inner_result, QarStatusCode new_code, const char *new_message) |
|
Wrap an existing result with a new code/message for propagation. More... | |
| static QarResult | qar_result_error (QarStatusCode code, const char *message) |
|
Construct an error result with code and optional message. More... | |
| static bool | qar_result_has_code (QarResult result, QarStatusCode code) |
|
Whether the result carries code, as its own code or as the code of any cause it wraps (for example a paused stream inside QAR_STATUS_RENDERING_PRODUCER_UNABLE_TO_DO_BEGIN_FRAME). More... | |
| static bool | qar_result_is_error (QarResult result) |
|
Check if result indicates failure. More... | |
| static bool | qar_result_is_success (QarResult result) |
|
Check if result indicates success. More... | |
| static void | qar_result_log_if_error (QarResult result) |
| static void | qar_result_message (QarResult result, char *out_buffer, size_t buffer_size) |
|
Copy a human-readable message into user buffer (NUL-terminated). More... | |
| static QarResult | qar_result_success (void) |
|
Construct a success result (code = QAR_STATUS_SUCCESS). More... | |
Macro Definitions Index
| #define | QAR_ASSUME_SUCCESS(RESULT_EXPR) ... |
|
Log the error message if the result is an error. More... | |
Functions
qar_error_wrap_result()
| inline static |
Wrap an existing result with a new code/message for propagation.
Definition at line 2137 of file qar_streaming.h.
qar_result_error()
| inline static |
Construct an error result with code and optional message.
Definition at line 2125 of file qar_streaming.h.
qar_result_has_code()
| inline static |
Whether the result carries code, as its own code or as the code of any cause it wraps (for example a paused stream inside QAR_STATUS_RENDERING_PRODUCER_UNABLE_TO_DO_BEGIN_FRAME).
Definition at line 2133 of file qar_streaming.h.
qar_result_is_error()
| inline static |
Check if result indicates failure.
Definition at line 2129 of file qar_streaming.h.
qar_result_is_success()
| inline static |
Check if result indicates success.
Definition at line 2127 of file qar_streaming.h.
qar_result_log_if_error()
| inline static |
Definition at line 2144 of file qar_streaming.h.
qar_result_message()
| inline static |
Copy a human-readable message into user buffer (NUL-terminated).
Definition at line 2142 of file qar_streaming.h.
qar_result_success()
| inline static |
Construct a success result (code = QAR_STATUS_SUCCESS).
Definition at line 2122 of file qar_streaming.h.
Macro Definitions
QAR_ASSUME_SUCCESS
|
Log the error message if the result is an error.
- Value
-
do \ { \ QarResult qar_result_tmp__ = (RESULT_EXPR); \ if(!qar_result_is_success(qar_result_tmp__)) \ { \ qar_result_log_if_error(qar_result_tmp__); \ exit(EXIT_FAILURE); \ } \ } \ while(0)
Definition at line 2147 of file qar_streaming.h.
Generated via doxygen2docusaurus 2.2.1 by Doxygen 1.9.8.