API Reference > Functions > SDAI > sdaiSetErrorHandler Function
sdaiSetErrorHandler Function
Syntax
C++
DAI_EXPORT void sdaiSetErrorHandler(SdaiErrorHandler function);

sdai.h

Parameters 
Description 
SdaiErrorHandler function 
[in] An error handler function. 

The Set Error Handler function appends a specified error handling function to the stack of SDAI error handlers. Stack structure assumes that when an error occurs, the most recently appended function is called. If the called function can not handle the error, the control is passed to the next handler function in the stack.

This function accepts the error handler function and can be called before the Open Session function call, during the SDAI session, and after the Close Session function fall. To use the system default error handler, pass the NULL handler pointer to the function. It is possible to set more than one error handling function: Just call Set Error Handler function as many times as you want with different error handling functions. These functions will be placed in the stack according to the sequence of Set Error Handler calls. When an error occurs, the error handling function from the top of the stack runs. The Set Error Handler function may cause the sdaiSY_ERR (underlying system error) error.

Copyright (c) 2002-2020. Open Design Alliance. All rights reserved.