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 final short
    The time unit used has incorrect value or cannot be used to compute an exact duration
    static final short
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    throwIt(short reason)
    Throws the Java Card runtime environment-owned instance of DateTimeException with the specified reason.

    Methods inherited from class CardRuntimeException

    getReason, setReason
    Modifier and Type
    Method
    Description
    short
    Gets the reason code
    void
    setReason(short reason)
    Sets the reason code.

    Methods inherited from class Object

    equals
    Modifier and Type
    Method
    Description
    boolean
    Compares two Objects for equality.
  • Field Details

    • INVALID_VALUE

      public static final short INVALID_VALUE
      The time value used is incorrect for the operation
      See Also:
    • 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:
  • Constructor Details

    • DateTimeException

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

    • 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