ptolemy.actor
Class NoTokenException

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.actor.NoTokenException
All Implemented Interfaces:
java.io.Serializable

public class NoTokenException
extends KernelRuntimeException

This exception is thrown when an attempt is made to get a token from a receiver that does not contain one. To avoid this exception, code should use the hasToken() method in the Receiver interface to determine if there is a token waiting.

Since:
Ptolemy II 0.2
Version:
$Id: NoTokenException.java 38797 2005-07-08 19:39:38Z cxh $
Author:
Lukito Muliadi
See Also:
Receiver, Serialized Form
Accepted Rating:
Green (neuendor)
Proposed Rating:
Green (lmuliadi)

Constructor Summary
NoTokenException(Nameable object, java.lang.String message)
          Construct an exception originating from the given object, with the given error message.
NoTokenException(java.lang.String message)
          Construct an exception with the given message.
 
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

NoTokenException

public NoTokenException(java.lang.String message)
Construct an exception with the given message.

Parameters:
message - The message.

NoTokenException

public NoTokenException(Nameable object,
                        java.lang.String message)
Construct an exception originating from the given object, with the given error message.

Parameters:
object - The originating object.
message - The message.