From f0d0aa50910ba9536f40e8a635bb4f70de84a76f Mon Sep 17 00:00:00 2001 From: Tuomas Virtanen Date: Wed, 27 Jun 2018 23:17:47 +0300 Subject: Add documentation and api cleanups --- include/kitchensink/kiterror.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'include/kitchensink/kiterror.h') 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 -- cgit v1.2.3