LibGame  v0.4.0
The LG Game Engine - Copyright (C) 2024 ETMSoftware
error.c File Reference

Functions

const char * error_str_from_error_code (const ErrSt e_a[], int n_el, int e_c)
 
const char * libetm_error_str (libetm_error_code e_c)
 
int big_error_in_lib (libetm_error_code e_c, const char *str)
 
void warning_in_lib (int wait, libetm_error_code e_c, const char *str)
 
void dump_libetm_error_codes ()
 

Detailed Description

 === Errors funcs ===

Function Documentation

◆ error_str_from_error_code()

const char* error_str_from_error_code ( const ErrSt  e_a[],
int  n_el,
int  e_c 
)

Generic find error string from error code in an ErrSt array function. Need to pass array's number of elements, as arrays are always passed as pointer: ErrSt array, n_el, error_code.

◆ libetm_error_str()

const char* libetm_error_str ( libetm_error_code  e_c)

Return error string from error code which apply to libetm only.

◆ big_error_in_lib()

int big_error_in_lib ( libetm_error_code  e_c,
const char *  str 
)

Critical error handler for libetm that will call big_error() function defined in app, so that appropiate behaviour can be choosen.

◆ warning_in_lib()

void warning_in_lib ( int  wait,
libetm_error_code  e_c,
const char *  str 
)

Warning handler for libetm that will call warning() function defined in app, so that appropiate behaviour can be choosen.

◆ dump_libetm_error_codes()

void dump_libetm_error_codes ( )

Dump libetm error codes and strings.