Register an extended fatal error handler.
void mco_error_set_handler_ex( /*IN*/ mco_error_handler_f_ex func);
| func | The name of the function in your application that will be called by the runtime to handle fatal error conditions |
Set the extended fatal error handler that accepts
__FILEand__LINEparameters.
| void | No return value |
Application snippet:
const char * dbname = "SimpleDb";
static void extended_errhandler( MCO_RET errcode, const char* file, int line)
{
printf( "\n eXtremeDB runtime fatal error: %d on line %d of file %s", errcode, line, file);
getchar();
exit( -1 );
}
int main(int argc, char* argv[])
{
mco_db_h db;
MCO_RET rc;
mco_device_t dev;
mco_db_params_t db_params;
...
mco_error_set_handler_ex(&extended_errhandler);
if( (rc = mco_runtime_start()) != MCO_S_OK)
exit(-1);
}