Handling errors

To process errors that are returned by Change Data Capture functions, reference error numbers by looking up their symbolic names in the syscdcerrcodes table.

About this task

Add code to your application to handle possible error conditions.

Procedure

  1. Declare error code variables for the types of errors that you intend to process separately.
  2. Query the syscdcerrcodes table to find the error number corresponding to each of the symbolic names of the Change Data Capture error codes.
  3. Set the error code variables to the Change Data Capture error numbers.
  4. Add code to handle each error condition.

What to do next

You can use the cdc_errortext() function to return the error text for a specified symbolic name.