Error Handling Functions

An introduction to error handling functions, including flexible design options, modifiable error code, and error tracking.

All the error handling functions are available through functions defined in

#include "c8messages.h"

These error-handling functions are available to both in-process and out-of-process tasks.

The design of error handling permits flexibility in its use. An application may implement error handling to whatever degree necessary. If desired, error handling may be ignored or it may be used after every call. Ignoring error conditions may result in undefined behavior.

You can implement your own error code with associated text messages. This is an alternative way to log errors on the Sybase CEP Engine logger. All calls to C8ErrorSet() result in a log entry in the Sybase CEP system log. All C8ErrorSet() calls are considered equal in the sense that there is no distinction between informational, warning, or fatal messages.

Errors are tracked on a per-thread basis. Once an error condition is detected, the error code will persist until C8ErrorClear() zeroes the error code or until the next Sybase CEP API function is called. Each Sybase CEP API call will reset the error.

A zero error code indicates no errors; this is the initial state.

Refer to c8messages.h for Sybase CEP error codes.

The following commands are available for handling error codes: