public class CardRuntimeException extends RuntimeException
CardRuntimeException class defines a field
 reason and two accessor methods 
 getReason() and
 setReason(). The reason field encapsulates an
 exception cause identifier in the Java Card platform. All Java Card platform
 unchecked Exception classes should extend CardRuntimeException.
 This class also provides a resource-saving mechanism (throwIt()
 method) for using a Java Card runtime environment-owned instance of this
 class.
 
 Even if a transaction is in progress, the update of the internal
 reason field shall not participate in the transaction. The
 value of the internal reason field of Java Card runtime
 environment-owned instance is reset to 0 on a tear or reset.
| Constructor and Description | 
|---|
| CardRuntimeException(short reason)Constructs a CardRuntimeException instance with the specified reason. | 
| Modifier and Type | Method and Description | 
|---|---|
| short | getReason()Gets the reason code | 
| void | setReason(short reason)Sets the reason code. | 
| static void | throwIt(short reason)Throws the Java Card runtime environment-owned instance of the
  CardRuntimeExceptionclass with the specified reason. | 
public CardRuntimeException(short reason)
throwIt() method to employ
 the Java Card runtime environment-owned instance of this class.reason - the reason for the exceptionpublic short getReason()
public void setReason(short reason)
reason field shall not participate in the
 transaction.reason - the reason for the exceptionpublic static void throwIt(short reason)
                    throws CardRuntimeException
CardRuntimeException class 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.
reason - the reason for the exceptionCardRuntimeException - alwaysCopyright © 1998, 2015, Oracle and/or its affiliates. All rights reserved.