Class DateTimeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
javacard.framework.CardRuntimeException
javacardx.framework.time.DateTimeException
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
FieldsModifier and TypeFieldDescriptionstatic final shortThe time unit used has incorrect value or cannot be used to compute an exact durationstatic final shortThe time value used is incorrect for the operation -
Constructor Summary
ConstructorsConstructorDescriptionDateTimeException(short reason) Creates aDateTimeExceptioninstance with the specified reason code. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidthrowIt(short reason) Throws the Java Card runtime environment-owned instance ofDateTimeExceptionwith the specified reason.Methods inherited from class CardRuntimeException
getReason, setReason
-
Field Details
-
INVALID_VALUE
public static final short INVALID_VALUEThe time value used is incorrect for the operation- See Also:
-
INVALID_UNIT
public static final short INVALID_UNITThe 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 aDateTimeExceptioninstance with the specified reason code.- Parameters:
reason- the exception cause
-
-
Method Details
-
throwIt
Throws the Java Card runtime environment-owned instance ofDateTimeExceptionwith 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
-