Use is subject to License Terms. Your use of this web site or any of its contents or software indicates your agreement to be bound by these License Terms.

Copyright © 2006 Sun Microsystems, Inc. All rights reserved.

JSR 177

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, CryptoException, ISOException, PINException, ServiceException, SystemException, TransactionException

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 an exception cause identifier in Java Card. All Java Card unchecked exception classes should extend CardRuntimeException.

See Also:
Serialized Form

Constructor Summary
CardRuntimeException(short reason)
          Constructs a CardRuntimeException instance with the specified reason.
 
Method Summary
 short getReason()
          Gets the reason code.
 void setReason(short reason)
          Sets the reason code.
static void throwIt(short reason)
          Throws 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)
Constructs a CardRuntimeException instance with the specified reason.

Parameters:
reason - the reason for the exception
Method Detail

getReason

public short getReason()
Gets the reason code.

Returns:
the reason for the exception
See Also:
setReason(short)

setReason

public void setReason(short reason)
Sets the reason code.

Parameters:
reason - the reason for the exception
See Also:
getReason()

throwIt

public static void throwIt(short reason)
                    throws CardRuntimeException
Throws an instance of the CardRuntimeException class with the specified reason.

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

JSR 177

Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

For more information, please consult the JSR 177 specification.