Banjo API 0.0.1
C99 game development API
Loading...
Searching...
No Matches
error.h File Reference
#include <banjo/api.h>
Include dependency graph for error.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define bj_error_code_kind(code)
#define bj_error_code_is_user(code)

Enumerations

enum  bj_error_code {
  BJ_ERROR_NONE = 0x00000000 , BJ_ERROR = 0x00000001 , BJ_ERROR_UNSUPPORTED = 0x00000101 , BJ_ERROR_NOT_IMPLEMENTED = 0x00000201 ,
  BJ_ERROR_SYSTEM = 0x00000002 , BJ_ERROR_FILE_NOT_FOUND = 0x00000102 , BJ_ERROR_CANNOT_ALLOCATE = 0x00000202 , BJ_ERROR_INITIALIZE = 0x00000302 ,
  BJ_ERROR_DISPOSE = 0x00000402 , BJ_ERROR_IO = 0x00000003 , BJ_ERROR_CANNOT_READ = 0x00000103 , BJ_ERROR_CANNOT_WRITE = 0x00000203 ,
  BJ_ERROR_INVALID_DATA = 0x00000004 , BJ_ERROR_INVALID_FORMAT = 0x00000104 , BJ_ERROR_INCORRECT_VALUE = 0x00000204 , BJ_ERROR_VIDEO = 0x00000005 ,
  BJ_ERROR_AUDIO = 0x00000006
}

Functions

void bj_set_error (struct bj_error **error, uint32_t code, const char *message)
void bj_set_error_fmt (struct bj_error **error, uint32_t code, const char *format,...)
void bj_propagate_error (struct bj_error **dest, struct bj_error *src)
void bj_propagate_prefixed_error (struct bj_error **dest, struct bj_error *src, const char *format,...)
void bj_prefix_error (struct bj_error **error, const char *prefix)
void bj_prefix_error_fmt (struct bj_error **error, const char *format,...)
struct bj_errorbj_copy_error (const struct bj_error *error)
void bj_clear_error (struct bj_error **error)
bj_bool bj_error_matches (const struct bj_error *error, uint32_t code)
bj_bool bj_error_matches_kind (const struct bj_error *error, uint32_t kind)
uint32_t bj_error_code (const struct bj_error *error)
const char * bj_error_message (const struct bj_error *error)

Detailed Description

Recoverable error handling.