The tibemsErrorContext objects collect additional error information beyond the status returned by most EMS calls. When a
tibemsErrorContext is created, EMS records detailed error information and a stack trace for the last error detected inside the EMS client library. Upon encountering an EMS error, the error information is written to the
tibemsErrorContext object and then cleared at the start of the next public EMS function call.
Because each thread of execution in an application may contain specific error information,
tibemsErrorContext objects should be created at the start of each thread and then destroyed before exiting the thread. Threads spawned internally by EMS will automatically create
tibemsErrorContext objects.
Passing NULL for the
errorContext parameter will default to the error context of the current thread. This is useful for retrieving information from within a listener or exception callback. This function returns a pointer, not a copy of the error string. If the last call was considered a non-error, an empty string is returned.
Returns TIBEMS_OK,
TIBEMS_INVALID_ARG (string is null, or passing an object created in a different thread),
TIBEMS_NOT_INITIALIZED (no error context for this thread)
Passing NULL for the
errorContext parameter will default to the error context of the current thread. This is useful for retrieving information from within a listener or exception callback. This function returns a pointer, not a copy of the stack trace string. If the last call was considered a non-error, an empty string is returned.
Returns TIBEMS_OK,
TIBEMS_INVALID_ARG (string is null, or passing an object created in a different thread),
TIBEMS_NOT_INITIALIZED (no error context for this thread)