mco_error_set_handler_ex

Register an extended fatal error handler.

Prototype

    void mco_error_set_handler_ex( /*IN*/ mco_error_handler_f_ex func);

Arguments

func
The name of the function in your application that will be called by the runtime to handle fatal error conditions.

Description

Set the extended fatal error handler that accepts __FILE__ and __LINE__ parameters.

Return Codes

void
No return value.

Example

    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);
    }

Files

Header file:
mco.h
Source file:
mcoerr.c
Library:
libmcounrt.a
Header file:
mco.h
Source file:
mcoerr.c
Library:
libmcouwrt.a