Package org.jcsp.lang
Class PoisonException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.jcsp.lang.ChannelDataRejectedException
-
- org.jcsp.lang.PoisonException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
NetworkPoisonException
,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
Constructors Modifier Constructor Description protected
PoisonException(int strength)
JCSP users should not have to construct these.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
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 ofAlternative
.
-
-