Revision as of 12:44, November 17, 2021 by Jose.druker@genesys.com (talk | contribs) (Correcting the syntax in the dbw-error-reactions example)
custom-error-reactions
You can specify any number of options within this section. For example, the dbw-error-reactions section that you define might include an option configured as follows:
[dbw-error-reactions]
dbw-error1=error=ORA1123-005;reaction=retry
To configure an error reaction, perform the following steps:
- Create a separate option for every database error message for which a certain reaction is required.
- Specify any meaningful name as the option name, making it unique within the dbw-error-reactions section; ICON does not process the name parameter.
- Include both a database error message and the expected reaction as two parameters of the option value, in the following format:
- error=<error_substring>;reaction=<reaction_type>
- Where:
- <error_substring>—The database error message or a substring of the error message that is sufficient to identify it among all database error messages. ICON selects the first option with a matching substring among all options that contain matching substrings. You can use any character and symbol in <error_substring> except the semicolon (;). A semicolon signals the end of the error parameter to ICON. If you must include a semicolon within a substring, surround the entire substring with single quotation marks (‘<error_substring>’) or double quotation marks ("<error_substring>").
- <reaction_type>—The expected reaction to the database error message identified by <error_substring>. The reaction can be one of the following:
- reconnect—ICON forcefully disconnects from the database and attempts to reconnect after receiving the database error message identified by <error_substring>. This reaction type is recommended for error messages related to the temporary unavailability of a database that is inadequately processed by the database server.
- retry—ICON rolls back the current transaction, and then attempts to resubmit it after receiving the database error message identified by <error_substring>. This reaction type is recommended for error messages related to nonfatal database problems (for example, a locked table state) that tend to disappear during subsequent transaction attempts.
- ignore—ICON rolls back the current transaction after receiving the database error message identified by <error_substring>. ICON then attempts to resubmit the failed transaction, statement by statement, ignoring the statement that caused the error. This reaction type is recommended for logical errors such as constraint violations.
- Default value: No default value
- Valid values: Any string in the following format: error=<error_substring>;reaction=<reaction_type>
- Changes take effect: Immediately
Example:
The following configuration option prompts ICON to resubmit a request that previously failed with an error message that contains the substring ORA1123-005:
dbw-error1=error=ORA1123-005;reaction=retry
Comments or questions about this documentation? Contact us for support!
