libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
|
Go to the source code of this file.
Data Structures | |
struct | GblErrorDomain |
struct | GblError |
Macros | |
#define | GBL_ERROR_DOMAIN |
#define | GBL_ERROR_MESSAGE_SIZE |
Functions | |
const GblErrorDomain * | gblErrorDomain (void) |
Accessors | |
Methods for accessing errors and their state | |
const GblError * | GblError_pending (void) |
GblQuark | GblError_domain (void) |
const char * | GblError_string (void) |
Management | |
Methods for managing pending errors | |
GblBool | GblError_clear (void) |
GblBool | GblError_lower (GblError *pSelf) |
const GblError * | GblError_raise (const char *pFile, const char *pFunction, size_t line, const GblErrorDomain *pDomain, GblEnum code, const char *pFmt,...) |
const GblError * | GblError_raisev (const char *pFile, const char *pFunction, size_t line, const GblErrorDomain *pDomain, GblEnum code, const char *pFmt, va_list varArgs) |
const GblError * | GblError_reraise (const char *pFile, const char *pFunction, size_t line) |
GblError thread-local generic error code.
This file contains the public API for GblError, which is a structure used to represent a single pending error status for a single thread.
Definition in file gimbal_error.h.
#define GBL_ERROR_DOMAIN |
Builtin standard error domain.
Definition at line 17 of file gimbal_error.h.
#define GBL_ERROR_MESSAGE_SIZE |
Size of the GblError::message string.
Definition at line 18 of file gimbal_error.h.
const GblError * GblError_pending | ( | void | ) |
Returns a pointer to the current thread's pending error or NULL.
GblQuark GblError_domain | ( | void | ) |
Returns GblQuark of the name of the current thread's pending error domain.
const char * GblError_string | ( | void | ) |
Returns the stringified version of the current thread's pending error code.
GblBool GblError_clear | ( | void | ) |
Clears the current thread's pending error, returning GBL_TRUE if there was a pending error.
Equivalent to GblError_clear(), except the pending error is copied into the destination buffer.
const GblError * GblError_raise | ( | const char * | pFile, |
const char * | pFunction, | ||
size_t | line, | ||
const GblErrorDomain * | pDomain, | ||
GblEnum | code, | ||
const char * | pFmt, | ||
... | |||
) |
Raises an error on the current thread with the given domain, code, and message.
const GblError * GblError_raisev | ( | const char * | pFile, |
const char * | pFunction, | ||
size_t | line, | ||
const GblErrorDomain * | pDomain, | ||
GblEnum | code, | ||
const char * | pFmt, | ||
va_list | varArgs | ||
) |
Equivalent to GblError_raise(), except the additional args are passed via a va_list.
const GblError * GblError_reraise | ( | const char * | pFile, |
const char * | pFunction, | ||
size_t | line | ||
) |
Reraises the current thread's pending error, updating its source context.
const GblErrorDomain * gblErrorDomain | ( | void | ) |
Returns the builtin error domain used by GBL_RESULT.