|
libtcod
|
Error handling module. More...
Go to the source code of this file.
Macros | |
| #define | TCOD_set_errorv(msg) |
| Set an error with version, file, and line info added to the output. | |
| #define | TCOD_set_errorvf(fmt, ...) |
| Format an error with version, file, and line info added to the output. | |
Typedefs | |
| typedef enum TCOD_Error | TCOD_Error |
| An enum of libtcod error codes. | |
Enumerations | |
| enum | TCOD_Error { TCOD_E_OK = 0 , TCOD_E_ERROR = -1 , TCOD_E_INVALID_ARGUMENT = -2 , TCOD_E_OUT_OF_MEMORY = -3 , TCOD_E_REQUIRES_ATTENTION = -4 , TCOD_E_WARN = 1 } |
| An enum of libtcod error codes. More... | |
Functions | |
| const char * | TCOD_get_error (void) |
| Return the last error message. | |
| TCOD_Error | TCOD_set_error (const char *msg) |
| Set an error message and return TCOD_E_ERROR. | |
| TCOD_Error | TCOD_set_errorf (const char *fmt,...) |
| Set an error message and return TCOD_E_ERROR. | |
| void | TCOD_clear_error (void) |
| Clear a current existing error message. | |
Error handling module.
| #define TCOD_set_errorv | ( | msg | ) |
Set an error with version, file, and line info added to the output.
Used internally.
| #define TCOD_set_errorvf | ( | fmt, | |
| ... ) |
Format an error with version, file, and line info added to the output.
Used internally.
| typedef enum TCOD_Error TCOD_Error |
An enum of libtcod error codes.
On values other than TCOD_E_OK you can use TCOD_get_error() to learn more information.
embed:rst:leading-asterisk * .. versionadded:: 1.16 *
| enum TCOD_Error |
An enum of libtcod error codes.
On values other than TCOD_E_OK you can use TCOD_get_error() to learn more information.
embed:rst:leading-asterisk * .. versionadded:: 1.16 *
| void TCOD_clear_error | ( | void | ) |
Clear a current existing error message.
embed:rst:leading-asterisk * .. versionadded:: 1.16 *
| const char * TCOD_get_error | ( | void | ) |
Return the last error message.
If there is no error then the string will have a length of zero.
embed:rst:leading-asterisk .. versionadded:: 1.12
| TCOD_Error TCOD_set_error | ( | const char * | msg | ) |
Set an error message and return TCOD_E_ERROR.
embed:rst:leading-asterisk .. versionadded:: 1.12
| TCOD_Error TCOD_set_errorf | ( | const char * | fmt, |
| ... ) |
Set an error message and return TCOD_E_ERROR.
embed:rst:leading-asterisk * .. versionadded:: 1.16 *