Package javacard.framework
Class CardRuntimeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- javacard.framework.CardRuntimeException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
APDUException
,BioException
,CardRuntimeExceptionSubclass
,CryptoException
,ExternalException
,ISOException
,PINException
,ServiceException
,SystemException
,TLVException
,TransactionException
,UtilException
public class CardRuntimeException extends java.lang.RuntimeException
TheCardRuntimeException
class defines a fieldreason
and two accessor methodsgetReason()
andsetReason()
. Thereason
field encapsulates exception cause identifier in the Java Card API. All Java Card API unchecked Exception classes should extendCardRuntimeException
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CardRuntimeException(short reason)
Construct a CardRuntimeException instance with the specified reason.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description short
getReason()
Get reason codevoid
setReason(short reason)
Set reason code.static void
throwIt(short reason)
Throw an instance of theCardRuntimeException
class with the specified reason.
-
-
-
Method Detail
-
getReason
public short getReason()
Get reason code- Returns:
- the reason for the exception
-
setReason
public void setReason(short reason)
Set reason code.- Parameters:
reason
- the reason for the exception
-
throwIt
public static void throwIt(short reason) throws CardRuntimeException
Throw an instance of theCardRuntimeException
class with the specified reason.- Parameters:
reason
- the reason for the exception- Throws:
CardRuntimeException
- always.
-
-