You can provide an error handler to respond to errors generated by the ODS Library by including in your application a call to the srv_errhandle function. Open Data Services automatically supplies parameters to the error handler to identify the type and severity of the error. Open Data Services also supplies the error handler with a pointer to text that describes the error.
An example of an error condition that invokes a developer-defined error handler is insufficient memory for internal processing. If a language event is received from the client and there is too little available memory for the buffer space required to hold the client's SQL query string the error handler will be called. In this case, the error handler normally informs the user of the condition by displaying a message and by writing information to the error log file using the pointer to the text that describes the error.