Class DateTimeException


  • public class DateTimeException
    extends CardRuntimeException
    Exception used to indicate a problem while calculating a date-time.

    This exception is used to indicate problems with creating, querying and manipulating date-time objects.

    Since:
    3.1
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static short INVALID_UNIT
      The time unit used has incorrect value or cannot be used to compute an exact duration
      static short INVALID_VALUE
      The time value used is incorrect for the operation
    • Constructor Summary

      Constructors 
      Constructor Description
      DateTimeException​(short reason)
      Creates a DateTimeException instance with the specified reason code.
    • Field Detail

      • INVALID_VALUE

        public static final short INVALID_VALUE
        The time value used is incorrect for the operation
        See Also:
        Constant Field Values
      • INVALID_UNIT

        public static final short INVALID_UNIT
        The time unit used has incorrect value or cannot be used to compute an exact duration
        See Also:
        Constant Field Values
    • Constructor Detail

      • DateTimeException

        public DateTimeException​(short reason)
        Creates a DateTimeException instance with the specified reason code.
        Parameters:
        reason - the exception cause
    • Method Detail

      • throwIt

        public static void throwIt​(short reason)
                            throws DateTimeException
        Throws the Java Card runtime environment-owned instance of DateTimeException with the specified reason.

        Java Card runtime environment-owned instances of exception classes are temporary Java Card runtime environment Entry Point Objects and can be accessed from any applet context. References to these temporary objects cannot be stored in class variables or instance variables or array components. See Runtime Environment Specification, Java Card Platform, Classic Edition, section 6.2.1 for details.

        Parameters:
        reason - the reason for the exception
        Throws:
        DateTimeException - always