mirror of
https://github.com/glfw/glfw.git
synced 2026-08-28 12:25:53 +02:00
Removed glfwGetError and glfwErrorString.
The cached error code cannot be made per-thread unless it required glfwInit (due to lack of __thread on OS X), which would be confusing and partially defeats the purpose of it. Beginners would use the generic error string facility instead of the error callback and then be confused by its nondescript messages. Storing the provided error code from within the error callback, whether globally or per-thread, requires just a few lines of code and hands control to the user without compromising thread safety.
This commit is contained in:
@@ -951,25 +951,6 @@ GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev);
|
||||
*/
|
||||
GLFWAPI const char* glfwGetVersionString(void);
|
||||
|
||||
/*! @brief Retrieves the latest error.
|
||||
* @return The latest @link errors error code @endlink.
|
||||
* @ingroup error
|
||||
*
|
||||
* @remarks This function may be called before @ref glfwInit.
|
||||
*/
|
||||
GLFWAPI int glfwGetError(void);
|
||||
|
||||
/*! @brief Retrieves a generic, human readable description of the specified error.
|
||||
* @param[in] error The @link errors error code @endlink to be described.
|
||||
* @return A UTF-8 encoded string describing the error.
|
||||
* @ingroup error
|
||||
*
|
||||
* @remarks This function may be called before @ref glfwInit.
|
||||
*
|
||||
* @remarks This function may be called from secondary threads.
|
||||
*/
|
||||
GLFWAPI const char* glfwErrorString(int error);
|
||||
|
||||
/*! @brief Sets the error callback.
|
||||
* @param[in] cbfun The new callback, or @c NULL to remove the currently set
|
||||
* callback.
|
||||
|
||||
Reference in New Issue
Block a user