ptolemy.kernel.util
Class InternalErrorException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byptolemy.kernel.util.KernelRuntimeException
                  extended byptolemy.kernel.util.InternalErrorException
All Implemented Interfaces:
java.io.Serializable

public class InternalErrorException
extends KernelRuntimeException

This exception should be thrown if an unexpected error is encountered other than one for which InvalidStateException would be appropriate. Our design should make it impossible for this exception to ever occur, so occurrence is a bug. This exception is a RuntimeException so that it does not have to be declared.

Since:
Ptolemy II 0.2
Version:
$Id: InternalErrorException.java,v 1.25 2004/04/13 03:43:39 cxh Exp $
Author:
Edward A. Lee, Christopher Hylands
See Also:
Serialized Form
Accepted Rating:
Green (cxh)
Proposed Rating:
Green (cxh)

Constructor Summary
InternalErrorException(Nameable object, java.lang.Throwable cause, java.lang.String detail)
          Construct an exception with a detail message that includes the names of the first argument plus the third argument string.
InternalErrorException(java.lang.String detail)
          Construct an exception with a detail message.
InternalErrorException(java.lang.Throwable cause)
          Construct an exception with only a cause.
 
Methods inherited from class ptolemy.kernel.util.KernelRuntimeException
_setCause, _setMessage, getCause, getMessage, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InternalErrorException

public InternalErrorException(java.lang.String detail)
Construct an exception with a detail message.

Parameters:
detail - The message.

InternalErrorException

public InternalErrorException(java.lang.Throwable cause)
Construct an exception with only a cause. If the cause argument is non-null, then the detail message of this argument will include the detail message of the cause argument. The stack trace of the cause argument is used when we print the stack trace of this exception.

This constructor is commonly used when we want to catch an exception and rethrow it as a RuntimeException so that the method where the exception is thrown need not declare that this method throws the initial exception.

Parameters:
cause - The cause of this exception.

InternalErrorException

public InternalErrorException(Nameable object,
                              java.lang.Throwable cause,
                              java.lang.String detail)
Construct an exception with a detail message that includes the names of the first argument plus the third argument string. If the cause argument is non-null, then the detail message of this argument will include the detail message of the cause argument. The stack trace of the cause argument is used when we print the stack trace of this exception. If one or more of the parameters are null, then the detail message is adjusted accordingly.

Parameters:
object - The object associated with this exception.
cause - The cause of this exception.
detail - The message.