javacard.framework
Class CardRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by 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

The CardRuntimeException class defines a field reason and two accessor methods getReason() and setReason(). The reason field encapsulates exception cause identifier in the Java Card API. All Java Card API unchecked Exception classes should extend CardRuntimeException.

See Also:
Serialized Form

Constructor Summary
CardRuntimeException(short reason)
          Construct a CardRuntimeException instance with the specified reason.
 
Method Summary
 short getReason()
          Get reason code
 void setReason(short reason)
          Set reason code.
static void throwIt(short reason)
          Throw an instance of the CardRuntimeException class with the specified reason.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CardRuntimeException

public CardRuntimeException(short reason)
Construct a CardRuntimeException instance with the specified reason.

Parameters:
reason - the reason for the exception
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 the CardRuntimeException class with the specified reason.

Parameters:
reason - the reason for the exception
Throws:
CardRuntimeException - always.


Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.