ilog.rules.engine

Class IlrUserRuntimeException

  • All Implemented Interfaces:
    java.io.Serializable


    public class IlrUserRuntimeException
    extends IlrRuntimeException

    This exception is thrown each time JRules detects an error at runtime. This exception is thrown at runtime when user's methods or constructors throw exceptions. These exceptions can be declared exceptions (for example IOException) or runtime exceptions (for example ArrayIndexOutOfBoundsException).

    There are two cases in processing this exception:

    • If the exception occurs in the condition part (that is, during the tests on the objects), you should use an exception handler to catch and process the exception. That way the engine can continue the rule processing. Without an exception handler, the exception will traverse the whole engine stack and the engine may be in an inconsistent state.
    • If the exception occurs in the action part, you can catch and process the exception. The execution context remains valid. The other actions in the rule following the action element which throws the exception are not executed.
    • If the exception occurs in a ruleflow, you can catch and process the exception. The remainder of the ruleflow is not executed.
    See Also:
    Serialized Form
    • Constructor Detail

      • IlrUserRuntimeException

        public IlrUserRuntimeException(java.lang.Throwable target)

        Constructs an exception using a target exception object thrown by the JVM.

        Parameters:
        target - The target exception.
    • Method Detail

      • isInConditions

        public boolean isInConditions()
        Returns true if the exception occurs in the condition part.
        Returns:
        true if the target exception occurs in the condition part, and false if the target exception occurs in the action part.
      • isInActions

        public boolean isInActions()
        Returns true if the exception occurs in the action part.
        Returns:
        true if the target exception occurs in the action part, and false if the target exception occurs in the condition part.

© Copyright IBM Corp. 1987, 2017