com.ibm.rules.engine.ruledef.runtime

Interface ExceptionHandler

  • All Superinterfaces:
    EngineService, MayBeDependantEngineService

    Deprecated. 
    As of ODM 8.8.1, the interface CustomExceptionHandler should be used to write a custom exception handler

    public interface ExceptionHandler
    extends MayBeDependantEngineService
    ExceptionHandler handles exceptions raised either during the evaluation of a rule condition or during the execution of the rule body. Depending on the location where the exception is raised, a specific handler method is called by the Engine. Engine execution is stopped and an ExecutionException instance referencing the original exception is send to the Engine caller.

    Note: this handler may re-raise an exception if the exception should not be hidden.

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void handleActionException(java.lang.Exception e, RuleInstance ruleInstance, com.ibm.rules.engine.util.Location location)
      Deprecated. 
      Called when an exception occurs during RuleAction execution.
      void handleConditionException(java.lang.Exception e, com.ibm.rules.engine.util.Location location)
      Deprecated. 
      Called when an exception occurs during a condition in a part that is not a predicate.
      boolean handlePredicateException(java.lang.Exception e, com.ibm.rules.engine.util.Location location)
      Deprecated. 
      Called when an exception occurs during condition test evaluation.
    • Method Detail

      • handlePredicateException

        boolean handlePredicateException(java.lang.Exception e,
                                       com.ibm.rules.engine.util.Location location)
                                         throws java.lang.Exception
        Deprecated. 
        Called when an exception occurs during condition test evaluation.
        Throws:
        java.lang.Exception - when RuleEngine execution must be stopped by raising an ExecutionException.
        Parameters:
        e - The exception raised.
        location - The rule group, including all the Rule objects that are sharing the predicate. If no group can be found, null is returned.
        Returns:
        If the result of the failed tests should be true, true is returned.
      • handleConditionException

        void handleConditionException(java.lang.Exception e,
                                    com.ibm.rules.engine.util.Location location)
                                      throws java.lang.Exception
        Deprecated. 
        Called when an exception occurs during a condition in a part that is not a predicate. The exception may have occurred in a generator, a hasher, or a group. For example, handleConditionException is called when an exception occurs in the generator function.
        Throws:
        java.lang.Exception - when RuleEngine execution must be stopped by raising an ExecutionException.
        Parameters:
        e - The exception raised.
        location - The rule group, including all the Rule objects that are sharing the predicate. If no group can be found, null is returned.
      • handleActionException

        void handleActionException(java.lang.Exception e,
                                 RuleInstance ruleInstance,
                                 com.ibm.rules.engine.util.Location location)
                                   throws java.lang.Exception
        Deprecated. 
        Called when an exception occurs during RuleAction execution.
        Throws:
        java.lang.Exception - when RuleEngine execution must be stopped by raising an ExecutionException.
        Parameters:
        e - The exception raised.
        ruleInstance - The rule instance.
        location - The rule group, including all the Rule objects that are sharing the predicate. If no group can be found, null is returned.

© Copyright IBM Corp. 1987, 2017