Skip to main content

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)

Test a result against a specific status code. 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 1285 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 1275 of file qar_streaming.h.

qar_result_has_code()

bool qar_result_has_code (QarResult result, QarStatusCode code)
inline static

Test a result against a specific status code.

Definition at line 1281 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 1279 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 1277 of file qar_streaming.h.

qar_result_log_if_error()

void qar_result_log_if_error (QarResult result)
inline static

Definition at line 1292 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 1290 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 1272 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 1295 of file qar_streaming.h.


Generated via doxygen2docusaurus 2.2.1 by Doxygen 1.9.8.