Package org.jcsp.lang

Class PoisonException

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int strength  
    • 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

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • strength

        private int strength
    • 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.