clSetErrorHandler(3dm) clSetErrorHandler(3dm) NAME clSetErrorHandler - Select an alternate error handling routine SYNOPSIS #include <dmedia/cl.h> CLerrFunc clSetErrorHandler(CLerrFunc efunc) ARGUMENTS efunc A pointer to an error handling routine declared as void ErrorFunc(CLhandle handle, int code, const char *format, ...) DESCRIPTION clSetErrorHandler allows overriding of the Compression Library's default error handling routine, which prints a message to stderr. The arguments that are passed to the error handling routine are a handle to the processing object, an error code, and a printf-like string optionally followed with printf-like arguments. The error codes are listed in <dmedia/cl.h>. RETURN VALUE clSetErrorHandler returns a pointer to the previous error handling routine. EXAMPLE #include <dmedia/cl.h> CLerrFunc originalErrorHandler; ... void silentCLError(CLhandle handle, int code, const char* format, ...) { /* ignore all CL errors */ } ... originalErrorHandler = clSetErrorHandler(silentCLError); /* CL errors here will go unnoticed */ ... /* back to normal reporting of CL errors */ ... SEE ALSO CLintro(3dm), clError(3dm), stdarg(5) Page 1