ptolemy.kernel.util
Class IllegalActionException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by ptolemy.kernel.util.KernelException
              extended by ptolemy.kernel.util.IllegalActionException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GraphActionException, InvariantViolationException, IterativeParameter.ConstraintViolationException, MultipleEnabledTransitionsException, MultipleEnabledTransitionsException, UndefinedConstantOrIdentifierException

public class IllegalActionException
extends KernelException

Thrown on an attempt to perform an action that would result in an inconsistent or contradictory data structure if it were allowed to complete.

Examples include:

  • An attempt to remove a port from an entity when the port does not belong to the entity.
  • An attempt to add an item with no name to a named list.
  • Since:
    Ptolemy II 0.2
    Version:
    $Id: IllegalActionException.java 38798 2005-07-08 20:00:01Z cxh $
    Author:
    Edward A. Lee, Christopher Hylands
    See Also:
    Serialized Form
    Accepted Rating:
    Green (cxh)
    Proposed Rating:
    Green (cxh)

    Constructor Summary
    IllegalActionException(Nameable object)
              Construct an exception with a detail message that is only the name of the argument.
    IllegalActionException(Nameable object1, Nameable object2)
              Construct an exception with a detail message that consists of only the names of the object1 and object2 arguments.
    IllegalActionException(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.
    IllegalActionException(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.
    IllegalActionException(Nameable object, java.lang.String detail)
              Construct an exception with a detail message that includes the name of the first argument.
    IllegalActionException(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.
    IllegalActionException(java.lang.String detail)
              Construct an exception with a detail message.
     
    Method Summary
     
    Methods inherited from class ptolemy.kernel.util.KernelException
    _setCause, _setMessage, generateMessage, generateMessage, generateMessage, getCause, getFullName, getMessage, getName, getNameable1, getNameable2, printStackTrace, printStackTrace, printStackTrace, stackTraceToString
     
    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

    IllegalActionException

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

    Parameters:
    detail - The message.

    IllegalActionException

    public IllegalActionException(Nameable object)
    Construct an exception with a detail message that is only the name of the argument.

    Parameters:
    object - The object.

    IllegalActionException

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

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

    IllegalActionException

    public IllegalActionException(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.

    Parameters:
    object - The object.
    cause - The cause of this exception, or null if the cause is not known or nonexistent.
    detail - The message.

    IllegalActionException

    public IllegalActionException(Nameable object1,
                                  Nameable object2)
    Construct an exception with a detail message that consists of only the names of the object1 and object2 arguments. If one or more of the parameters are null, then the message of the exception is adjusted accordingly.

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

    IllegalActionException

    public IllegalActionException(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. If one or more of the parameters are null, then the message of the exception is adjusted accordingly.

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

    IllegalActionException

    public IllegalActionException(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. If the cause argument is non-null, then the message of this exception will include the 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 message of the exception is adjusted accordingly.

    Parameters:
    object1 - The first object.
    object2 - The second object.
    cause - The cause of this exception, or null if the cause is not known or nonexistent.
    detail - The message.