ptolemy.kernel.util
Class InternalErrorException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by ptolemy.kernel.util.KernelRuntimeException
                  extended by ptolemy.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 57046 2010-01-27 23:35:53Z cxh $
Author:
Edward A. Lee, Christopher Hylands
See Also:
Serialized Form
Accepted Rating:
Green (cxh)
Proposed Rating:
Green (cxh)

Constructor Summary
InternalErrorException(Nameable object, Nameable object2, java.lang.Throwable cause, java.lang.String detail)
          Construct an exception with a detail message that includes the names of the first argument, the name of the second argument and the value of the third argument.
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.
 
Method Summary
 
Methods inherited from class ptolemy.kernel.util.KernelRuntimeException
_setCause, _setMessage, getCause, getMessage, getNameables, 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.

InternalErrorException

public InternalErrorException(Nameable object,
                              Nameable object2,
                              java.lang.Throwable cause,
                              java.lang.String detail)
Construct an exception with a detail message that includes the names of the first argument, the name of the second argument and the value of the third argument. 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 first object associated with this exception.
object2 - The second object associated with this exception.
cause - The cause of this exception.
detail - The message.