ptolemy.kernel.util
Class InvalidStateException

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.InvalidStateException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GraphInvalidStateException, NotSchedulableException, NumericalNonconvergeException

public class InvalidStateException
extends KernelRuntimeException

Some object or set of objects has a state that is not permitted. E.g., a NamedObj has a null name. Or a topology has inconsistent or contradictory information in it, e.g. an entity contains a port that has a different entity as it container. Our design should make it impossible for this exception to ever occur, so occurrence is a bug.

Since:
Ptolemy II 0.2
Version:
$Id: InvalidStateException.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Edward A. Lee, Jie Liu
See Also:
Serialized Form
Accepted Rating:
Green (cxh)
Proposed Rating:
Green (cxh)

Constructor Summary
InvalidStateException(java.util.Collection objects, java.lang.String detail)
          Constructs an exception with a detail message that includes the names of a collection of nameable objects plus the argument string.
InvalidStateException(java.util.Collection objects, java.lang.Throwable cause, java.lang.String detail)
          Constructs an exception with a detail message that includes the names of a collection of nameable objects plus the argument string.
InvalidStateException(java.util.Enumeration objects, java.lang.String detail)
          Deprecated. Use InvalidStateException(Collection, String) instead.
InvalidStateException(Nameable object1, Nameable object2, java.lang.String detail)
          Construct an exception with a detail message that includes the names of the first two arguments plus the third argument string.
InvalidStateException(Nameable object1, Nameable object2, java.lang.Throwable cause, java.lang.String detail)
          Construct an exception with a detail message that includes the names of the first two arguments plus the third argument string.
InvalidStateException(Nameable object, java.lang.String detail)
          Construct an exception with a detail message that includes the name of the first argument and the second argument string.
InvalidStateException(Nameable object, java.lang.Throwable cause, java.lang.String detail)
          Construct an exception with a detail message that includes the name of the first argument, the cause and the third argument string.
InvalidStateException(java.lang.String detail)
          Construct an exception with only a detail message.
 
Method Summary
private static java.util.List _list(java.util.Enumeration objects)
           
 
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

InvalidStateException

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

Parameters:
detail - The message.

InvalidStateException

public InvalidStateException(Nameable object,
                             java.lang.Throwable cause,
                             java.lang.String detail)
Construct an exception with a detail message that includes the name of the first argument, the cause and the third argument string.

Parameters:
object - The nameable object involved in the exception
cause - The cause of this exception.
detail - The message.

InvalidStateException

public InvalidStateException(Nameable object,
                             java.lang.String detail)
Construct an exception with a detail message that includes the name of the first argument and the second argument string.

Parameters:
object - The object.
detail - The message.

InvalidStateException

public InvalidStateException(Nameable object1,
                             Nameable object2,
                             java.lang.String detail)
Construct an exception with a detail message that includes the names of the first two arguments plus the third argument string.

Parameters:
object1 - The first object.
object2 - The second object.
detail - The message.

InvalidStateException

public InvalidStateException(Nameable object1,
                             Nameable object2,
                             java.lang.Throwable cause,
                             java.lang.String detail)
Construct an exception with a detail message that includes the names of the first two arguments plus the third argument string.

Parameters:
object1 - The first object.
object2 - The second object.
cause - The cause of this exception.
detail - The message.

InvalidStateException

public InvalidStateException(java.util.Enumeration objects,
                             java.lang.String detail)
Deprecated. Use InvalidStateException(Collection, String) instead.

Construct an exception with a detail message that includes the names of an enumeration of nameable object plus the argument string.

Parameters:
objects - The enumeration of Nameable objects
detail - The message.

InvalidStateException

public InvalidStateException(java.util.Collection objects,
                             java.lang.String detail)
Constructs an exception with a detail message that includes the names of a collection of nameable objects plus the argument string.

Parameters:
objects - The Collection of Nameable objects
detail - The message.

InvalidStateException

public InvalidStateException(java.util.Collection objects,
                             java.lang.Throwable cause,
                             java.lang.String detail)
Constructs an exception with a detail message that includes the names of a collection of nameable objects plus the argument string.

Parameters:
objects - The Collection of Nameable objects
cause - The cause of this exception.
detail - The message.
Method Detail

_list

private static java.util.List _list(java.util.Enumeration objects)