Errors

By default, Open Server responds to errors by writing error messages to the log file. Developers can tailor an application’s response by installing an error handling routine.

Typically, an error handler detects the type and severity of an error, and takes a specific action based on these values. For example, an application may send particular errors to a client through the srv_sendinfo routine, while writing others to a log file.

To install an error handler use the srv_props routine with the property argument set to SRV_S_ERRHANDLE. An application should install its error handler just after calling srv_version to catch all types of errors. When an error occurs, Open Server invokes the error-handling routine that was most recently installed.

For more information, see srv_props.