mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-15 01:08:26 +00:00
docs: Filled in some category pages.
This commit is contained in:
parent
a57ecad648
commit
c25423b94c
4 changed files with 63 additions and 5 deletions
|
@ -23,6 +23,26 @@
|
|||
* # CategoryError
|
||||
*
|
||||
* Simple error message routines for SDL.
|
||||
*
|
||||
* Most apps will interface with these APIs in exactly one function: when
|
||||
* almost any SDL function call reports failure, you can get a human-readable
|
||||
* string of the problem from SDL_GetError().
|
||||
*
|
||||
* These strings are maintained per-thread, and apps are welcome to set their
|
||||
* own errors, which is popular when building libraries on top of SDL for
|
||||
* other apps to consume. These strings are set by calling SDL_SetError.
|
||||
*
|
||||
* A common usage pattern is to have a function that returns true for success
|
||||
* and false for failure, and do this when something fails:
|
||||
*
|
||||
* ```c
|
||||
* if (something_went_wrong) {
|
||||
* return SDL_SetError("The thing broke in this specific way: %d", errcode);
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* It's also common to just return `false` in this case if the failing thing
|
||||
* is known to call SDL_SetError(), so errors simply propagate through.
|
||||
*/
|
||||
|
||||
#ifndef SDL_error_h_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue