CSP for Java
(JCSP) 1.1-rc4

org.jcsp.lang
Class PoisonException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.jcsp.lang.ChannelDataRejectedException
                  extended by org.jcsp.lang.PoisonException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PoisonFilterException

public class PoisonException
extends ChannelDataRejectedException

This exception is thrown when a process tries to use a channel that has been poisoned.

See Also:
Poisonable, Serialized Form

Constructor Summary
protected PoisonException(int strength)
          JCSP users should not have to construct these.
 
Method Summary
 int getStrength()
          Once this exception has been caught, the catching process should poison all its channels with the strength held by the exception (which will normally be the strength of the poison in the channel that caused the exception to be thrown).
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PoisonException

protected PoisonException(int strength)
JCSP users should not have to construct these.

Parameters:
strength - the strength of this exception (which will normally be the strength of the poison in the channel).
Method Detail

getStrength

public int getStrength()
Once this exception has been caught, the catching process should poison all its channels with the strength held by the exception (which will normally be the strength of the poison in the channel that caused the exception to be thrown). See the example handler at the end of this section of the documentation of Alternative.


CSP for Java
(JCSP) 1.1-rc4

Submit a bug or feature to jcsp-team@kent.ac.uk
Version 1.1-rc4 of the JCSP API Specification (Copyright 1997-2008 P.D.Austin and P.H.Welch - All Rights Reserved)
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.