atobase 3.2.0
ATOMAS atobase
Error Handler

Handle any errors that an SDK may produce. More...

Functions

ATO_EXPORT bool ato_errh_handler (ato_Ctx *ctx, int errcode)
 Invoke the error handler for any errors in the Context. More...
 

Detailed Description

Handle any errors that an SDK may produce.

Function Documentation

◆ ato_errh_handler()

ATO_EXPORT bool ato_errh_handler ( ato_Ctx ctx,
int  errcode 
)

Invoke the error handler for any errors in the Context.

Each SDK has its own handler to handle custom error objects the SDK may produce.

The error handler interprets the error and calls the logging function.

The default logging function can be replaced by the application - see ato_log_setlogfn().

Parameters
ctxthe thread local context containing 0 or more (nested) ato_Err objects.
errcodethe error code of the top level error object. If this does not match, it indicates a coding error has occurred which will result in an assertion failure.
Returns
TRUE if the error was processed (i.e. logged) or FALSE otherwise.