Ylva And Malin
ym_error.h
Go to the documentation of this file.
1 #pragma once
2 #include <ym_attributes.h>
3 
36 typedef
37 enum
38 {
39  ym_errc_success = (0 << 0),
41  ym_errc_bad_alloc = (1 << 1),
42  ym_errc_mem_leak = (1 << 2),
45  ym_errc_gl_error = (1 << 5),
48 } ym_errc;
49 
50 
61 void
63 
74 ym_errc
76 
87 const char*
88 ym_errc_str(ym_errc errc);
ym_errc ym_clear_error()
Clears the global error and gets back its previous values. Only used for handling errors when testing...
Definition: ym_error.c:12
const char * ym_errc_str(ym_errc errc)
Translates an ym_errc to a human readable string.
Definition: ym_error.c:20
#define YM_NO_DISCARD
YM_NO_DISCARD is a platform independent macro informing the compiler to warn if a return value from a...
Definition: ym_attributes.h:94
Indicates a successful operation.
Definition: ym_error.h:39
Indicates that requested memory could not be allocated.
Definition: ym_error.h:41
Definition: ym_error.h:46
Definition: ym_error.h:44
ym_errc
Used to indicate erroneous behavior within a a function.
Definition: ym_error.h:36
Definition: ym_error.h:45
Definition: ym_error.h:43
Definition: ym_error.h:47
Indicates that memory has been leaked from a region.
Definition: ym_error.h:42
void ym_raise_error(ym_errc errc)
Sets the new global error within the ym project. Only used for handling errors when testing...
Definition: ym_error.c:6
Indicates that one of the parameters supplied to the function was invalid.
Definition: ym_error.h:40