Samples Directory
/CRIWARE/SDK/pc/samples/criatomex/error_callback
Sample Description
- Error callback is provided as a feature to detect errors occurred in CRI Atom.
Application can define and register callback function, get error ID or error message, and handle errors.
#define SMP_ERROR_STR_LENGTH (256)
static CriChar8 g_smp_error_msg[SMP_ERROR_STR_LENGTH];
{
:
:
:
}
static void user_error_callback_func(const Char8 *errid, Uint32 p1, Uint32 p2, Uint32 *parray)
{
const Char8 *errmsg;
UNUSED(parray);
criFwPrt_DebugPrintf("%s\n", errmsg);
smputl_strcpy(g_smp_error_msg, errmsg);
return;
}
CriBool criAtomEx_Initialize(const CriAtomExConfig *config, void *work, CriSint32 work_size)
Initialize the library.
const CriChar8 * criErr_ConvertIdToMessage(const CriChar8 *errid, CriUint32 p1, CriUint32 p2)
Convert error ID to error message.
void criErr_SetCallback(CriErrCbFunc cbf)
Register error callback function.
- Most errors that invoke error callback are critical errors.
When these errors occur, be sure to not ignore these errors, but solve them.
If you are not sure how to solve the errors, please contact CRI technical support.