summaryrefslogtreecommitdiff
path: root/include/kitchensink/kiterror.h
diff options
context:
space:
mode:
authorTuomas Virtanen <katajakasa@gmail.com>2018-06-27 23:17:47 +0300
committerTuomas Virtanen <katajakasa@gmail.com>2018-06-27 23:17:47 +0300
commitf0d0aa50910ba9536f40e8a635bb4f70de84a76f (patch)
tree3f58c51353a165d79d4d0ee9b5f2c6f64e87678a /include/kitchensink/kiterror.h
parentc7fc4f2ca9a0d750f32a9f6cf7c86cd2ac548d0f (diff)
Add documentation and api cleanups
Diffstat (limited to 'include/kitchensink/kiterror.h')
-rw-r--r--include/kitchensink/kiterror.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/kitchensink/kiterror.h b/include/kitchensink/kiterror.h
index 824ea8c..e6c2acd 100644
--- a/include/kitchensink/kiterror.h
+++ b/include/kitchensink/kiterror.h
@@ -1,14 +1,38 @@
#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