Handle errors in your C component

As a general rule, code C component methods to handle unrecoverable errors as follows:

  1. Write detailed error descriptions to the server log file using JagLog.

  2. Call JagSendMsg to send a descriptive message to the client.

  3. If the component is transactional, call JagDisallowCommit or JagRollbackWork as appropriate.

  4. Return CS_FAIL to indicate failed execution.

Chapter 5, “C Routines Reference,” of the EAServer API Reference contains reference pages for these routines.