Skip to main content
Version: 0.9.0 (next)

Error Handling

Functions Index​

static QarResultqar_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 QarResultqar_result_error (QarStatusCode code, const char *message)

Construct an error result with code and optional message. More...

static boolqar_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 boolqar_result_is_error (QarResult result)

Check if result indicates failure. More...

static boolqar_result_is_success (QarResult result)

Check if result indicates success. More...

static voidqar_result_log_if_error (QarResult result)
static voidqar_result_message (QarResult result, char *out_buffer, size_t buffer_size)

Copy a human-readable message into user buffer (NUL-terminated). More...

static QarResultqar_result_success (void)

Construct a success result (code = QAR_STATUS_SUCCESS). More...

Macro Definitions Index​

#defineQAR_ASSUME_SUCCESS(RESULT_EXPR)   ...

Log the error message if the result is an error. More...

Functions​

qar_error_wrap_result()​

QarResult qar_error_wrap_result (QarResult inner_result, QarStatusCode new_code, const char * new_message)
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()​

QarResult qar_result_error (QarStatusCode code, const char * message)
inline static

Construct an error result with code and optional message.

Definition at line 2125 of file qar_streaming.h.

qar_result_has_code()​

bool qar_result_has_code (QarResult result, QarStatusCode 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()​

bool qar_result_is_error (QarResult result)
inline static

Check if result indicates failure.

Definition at line 2129 of file qar_streaming.h.

qar_result_is_success()​

bool qar_result_is_success (QarResult result)
inline static

Check if result indicates success.

Definition at line 2127 of file qar_streaming.h.

qar_result_log_if_error()​

void qar_result_log_if_error (QarResult result)
inline static

Definition at line 2144 of file qar_streaming.h.

qar_result_message()​

void qar_result_message (QarResult result, char * out_buffer, size_t buffer_size)
inline static

Copy a human-readable message into user buffer (NUL-terminated).

Definition at line 2142 of file qar_streaming.h.

qar_result_success()​

QarResult qar_result_success (void)
inline static

Construct a success result (code = QAR_STATUS_SUCCESS).

Definition at line 2122 of file qar_streaming.h.

Macro Definitions​

QAR_ASSUME_SUCCESS​

#define QAR_ASSUME_SUCCESS(RESULT_EXPR)   ...

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.