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.