blob: e6c2acda82af1e645f95094fb223a3efc1eefb35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#ifndef KITERROR_H
#define KITERROR_H
/**
* @brief Error handling functions
*
* @file kiterror.h
* @author Tuomas Virtanen
* @date 2018-06-25
*/
#include "kitchensink/kitconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Returns the latest error. This is set by SDL_kitchensink library functions on error.
*
* @return Error message or NULL
*/
KIT_API const char* Kit_GetError();
/**
* @brief Sets the error message. This should really only be used by the library.
*
* @param fmt Message format
* @param ... Message arguments
*/
KIT_API void Kit_SetError(const char* fmt, ...);
/**
* @brief Clears latest error message. After this, Kit_GetError() will return NULL.
*/
KIT_API void Kit_ClearError();
#ifdef __cplusplus
}
#endif
#endif // KITERROR_H
|