clSetErrorHandler(3dm)clSetErrorHandler(3dm)NAMEclSetErrorHandler - 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, ...)
DESCRIPTIONclSetErrorHandler 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 VALUEclSetErrorHandler 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 */
...
clSetErrorHandler(originalErrorHandler);
/* back to normal reporting of CL errors */
...
SEE ALSOCLintro(3dm), clError(3dm), stdarg(5)
Page 1