Rule Execution Server API

ilog.rules.engine
Class IlrBadContextException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by ilog.rules.engine.IlrBadContextException
All Implemented Interfaces:
Serializable

public final class IlrBadContextException
extends RuntimeException

This exception is thrown when there is a mismatch between execution context classes.

The class IlrRuleset represents a ruleset and the class IlrContext represents the context where a ruleset is executed. Since rules can refer to and use the fields and methods of the derived context class, the rules defined for a given context cannot be used by another context. This exception is thrown if the context is not the correct type.

Below is the list of methods that perform context type checking. These methods may throw an exception of class IlrBadContextException. See these methods for more details.

See Also:
IlrRuleset.IlrRuleset(java.lang.Class), IlrRuleset.addRule(ilog.rules.engine.IlrRule), IlrRuleset.removeRule(ilog.rules.engine.IlrRule), IlrRuleset.replaceRule(ilog.rules.engine.IlrRule), IlrRuleset.mergeRules(ilog.rules.engine.IlrRuleset), Serialized Form

Constructor Summary
IlrBadContextException(Class expected, Class passed)
          Constructs an IlrBadContextException using two classes.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlrBadContextException

public IlrBadContextException(Class expected,
                              Class passed)

Constructs an IlrBadContextException using two classes.

Parameters:
expected - The root class of the expected classes.
passed - The class actually passed.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013