Rule Execution Server API

ilog.rules.engine
Class IlrRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by ilog.rules.engine.IlrRuntimeException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
IlrSystemRuntimeException, IlrUserRuntimeException

public abstract class IlrRuntimeException
extends RuntimeException

This exception is the base class of all the runtime exceptions thrown by the rule engine during the execution of rules. As this class is abstract, the thrown exceptions will be instances of derived classes.

See Also:
Serialized Form

Constructor Summary
protected IlrRuntimeException(Throwable target)
          Constructs an exception using a target exception object thrown by the JVM.
protected IlrRuntimeException(Throwable target, Member member)
          Constructs an IlrRuntimeException with a target exception thrown by the JVM and a Java reflection member (method or field) which has caused the exception.
 
Method Summary
 String getMessage()
           
 Throwable getTargetException()
          Returns the target exception reported by the Java virtual machine.
 Member getTargetMember()
          Returns the target member (a field, a method or a constructor of some class in the application) which caused the exception.
 void printHeader(PrintWriter s)
          Prints the header of the rule stack trace.
 void printRuleStackTrace()
          Prints the rule stack trace to System.err.
 void printRuleStackTrace(PrintStream s)
          Prints the rule stack trace to a PrintStream.
 void printRuleStackTrace(PrintWriter s)
          Prints the rule stack trace to a PrintWriter.
 void printStackTrace()
          Prints a stack trace using the target member and the target exception.
 void printStackTrace(PrintStream s)
          Prints a stack trace using the target member and the target exception.
 void printStackTrace(PrintWriter s)
          Prints a stack trace using the target member and the target exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlrRuntimeException

protected IlrRuntimeException(Throwable target,
                              Member member)

Constructs an IlrRuntimeException with a target exception thrown by the JVM and a Java reflection member (method or field) which has caused the exception.

Parameters:
target - The target exception.
member - The target reflection member.

IlrRuntimeException

protected IlrRuntimeException(Throwable target)

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

Parameters:
target - The target exception.
Method Detail

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable

getTargetMember

public Member getTargetMember()

Returns the target member (a field, a method or a constructor of some class in the application) which caused the exception.

Returns:
a member (field, method or constructor), or null if the exception is not related to a specific class member.

getTargetException

public Throwable getTargetException()

Returns the target exception reported by the Java virtual machine.

Returns:
a throwable object. This exception is never null.

printRuleStackTrace

public void printRuleStackTrace()

Prints the rule stack trace to System.err. A rule stack trace does not include the stack trace of the original Java exception.


printRuleStackTrace

public void printRuleStackTrace(PrintWriter s)

Prints the rule stack trace to a PrintWriter. A rule stack trace does not include the stack trace of the original Java exception.

Parameters:
s - The PrintWriter to write the rule stack trace.

printHeader

public void printHeader(PrintWriter s)
Prints the header of the rule stack trace. The header is composed of the exception class name.

Parameters:
s - The PrintWriter to write the rule stack trace.

printRuleStackTrace

public void printRuleStackTrace(PrintStream s)

Prints the rule stack trace to a PrintStream. A rule stack trace does not include the stack trace of the original Java exception.


printStackTrace

public void printStackTrace()

Prints a stack trace using the target member and the target exception. A stack trace is composed of a rule stack trace and the original Java exception's stack trace.

Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace(PrintWriter s)

Prints a stack trace using the target member and the target exception. A stack trace is composed of a rule stack trace and the original Java exception's stack trace.

Overrides:
printStackTrace in class Throwable
Parameters:
s - A print writer to which the stack trace will be printed.

printStackTrace

public void printStackTrace(PrintStream s)

Prints a stack trace using the target member and the target exception. A stack trace is composed of a rule stack trace and the original Java exception's stack trace.

Overrides:
printStackTrace in class Throwable
Parameters:
s - A print stream to which the stack trace will be printed.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013