Class SuspendException

  • All Implemented Interfaces:
    java.io.Serializable

    public class SuspendException
    extends javacard.framework.CardRuntimeException
    This class extends the Throwable class and allows the classes of this package to throw specific exceptions in case of problems.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static short UNEXPECTED_COMPARE
      This reason code (= 2) is used to indicate that the compare operation is not recognized because the value is not defined in SuspendConstants.
      static short UNEXPECTED_OVERFLOW
      This reason code (= 3) is used to indicate that the value in seconds is above the maximum value allowed (221183999 or 0x0D2EFFFF).
      static short UNEXPECTED_TIME_UNIT
      This reason code (= 1) is used to indicate that the time unit format is not recognized because the value is not defined in SuspendConstants.
    • Constructor Summary

      Constructors 
      Constructor Description
      SuspendException​(short reason)
      Construct a SuspendException instance with the specified reason.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void throwIt​(short reason)
      Throws the JCRE instance of the SuspendException class with the specified reason.
      • Methods inherited from class javacard.framework.CardRuntimeException

        getReason, setReason
      • 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

      • UNEXPECTED_TIME_UNIT

        public static final short UNEXPECTED_TIME_UNIT
        This reason code (= 1) is used to indicate that the time unit format is not recognized because the value is not defined in SuspendConstants.
        See Also:
        Constant Field Values
      • UNEXPECTED_COMPARE

        public static final short UNEXPECTED_COMPARE
        This reason code (= 2) is used to indicate that the compare operation is not recognized because the value is not defined in SuspendConstants.
        See Also:
        Constant Field Values
      • UNEXPECTED_OVERFLOW

        public static final short UNEXPECTED_OVERFLOW
        This reason code (= 3) is used to indicate that the value in seconds is above the maximum value allowed (221183999 or 0x0D2EFFFF).
        See Also:
        Constant Field Values
    • Constructor Detail

      • SuspendException

        public SuspendException​(short reason)
        Construct a SuspendException instance with the specified reason. To conserve on resources use throwIt() method to re-use the JCRE instance of this class.
        Parameters:
        reason - the reason for the exception
    • Method Detail

      • throwIt

        public static void throwIt​(short reason)
                            throws SuspendException
        Throws the JCRE instance of the SuspendException class with the specified reason.
        Parameters:
        reason - the reason for the exception.
        Throws:
        SuspendException - always