Skia
2DGraphicsLibrary
|
Go to the source code of this file.
Typedefs | |
typedef void(* | SkErrorCallbackFunction )(SkError, void *) |
Type for callback functions to be invoked whenever an error is registered. More... | |
Functions | |
SkError | SkGetLastError () |
Return the current per-thread error code. More... | |
void | SkClearLastError () |
Clear the current per-thread error code back to kNoError_SkError. | |
void | SkSetErrorCallback (SkErrorCallbackFunction cb, void *context) |
Set the current per-thread error callback. More... | |
const char * | SkGetLastErrorString () |
Get a human-readable description of the last (per-thread) error that occurred. More... | |
typedef void(* SkErrorCallbackFunction)(SkError, void *) |
Type for callback functions to be invoked whenever an error is registered.
Callback functions take the error code being set, as well as a context argument that is provided when the callback is registered.
enum SkError |
SkError SkGetLastError | ( | ) |
Return the current per-thread error code.
Error codes are "sticky"; they are not not reset by subsequent successful operations.
const char* SkGetLastErrorString | ( | ) |
Get a human-readable description of the last (per-thread) error that occurred.
The returned error message will include not only a human readable version of the error code, but also information about the conditions that led to the error itself.
void SkSetErrorCallback | ( | SkErrorCallbackFunction | cb, |
void * | context | ||
) |
Set the current per-thread error callback.
cb | The callback function to be invoked. Passing NULL for cb will revert to the default error callback which does nothing on release builds, but on debug builds will print an informative error message to the screen. |
context | An arbitrary pointer that will be passed to the provided callback function. |