cgGetErrorHandler
Keywords: cgGetErrorHandler, NVIDIA, NVIDIA Cg Toolkit, Cg Toolkit, Shader, Shader Programming, GPU Shader Programming, GPU Program

> ## Name

> cgGetErrorHandler - get the error handler callback function

> ## Synopsis

>     #include <Cg/cg.h>

>     typedef void (*CGerrorHandlerFunc)( CGcontext context,
>                                         CGerror error,
>                                         void * appdata );

>     CGerrorHandlerFunc cgGetErrorHandler( void ** appdataptr );

> ## Parameters

> appdataptr
>   A pointer for an application provided data pointer.

> ## Return Values

> Returns the current error handler callback function.

> Returns NULL if no callback function is set.

> If appdataptr is not NULL then the current appdata pointer will be copied into the location pointed to by appdataptr.

> ## Description

> cgGetErrorHandler returns the current error handler callback function and application provided data pointer.

> ## Examples

>     void * appdata = NULL;
>     CGerrorHandlerFunc errorHandler = cgGetErrorHandler( &appdata );

> ## Errors

> None.

> ## History

> cgGetErrorHandler was introduced in Cg 1.4.

> ## See Also

> cgSetErrorHandler