The term exception is shorthand for the phrase "exceptional event".
An exception is an event that occurs during the execution of a program, which disrupts the normal flow of the program's instructions. This is an unexpected error and different from an error condition that has been anticipated and for which there's a defined response.
These are some of the causes of program exceptions:
Scenario
It is always possible that you could experience an unexpected error as a rule set runs. If this happens due to an exception, it is often difficult to see any evidence of the crash.Usually, the only notification will appear in the system diagnostics, which is rarely visible. This differs from a more normal error that would appear in a job's history.
What we need is a method for the rule set itself to tell us that there was a problem and we can do that in a couple of ways.
It is possible and sometimes desirable to have both a generic handler that performs a certain workflow when an exception occurs as well as a specific handler (for the same exception) that does something different. The example that follows will demonstrate this.