FileDocCategorySizeDatePackage
CardRuntimeException.javaAPI DocphoneME MR2 API (J2ME)2534Wed May 02 18:00:40 BST 2007javacard.framework

CardRuntimeException

public class CardRuntimeException extends 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.

Fields Summary
private short
reason
Reason code for the detected error.
Constructors Summary
public CardRuntimeException(short reason)
Constructs a CardRuntimeException instance with the specified reason.

param
reason the reason for the exception

	setReason(reason);
    
Methods Summary
public shortgetReason()
Gets the reason code.

return
the reason for the exception
see
#setReason

	return reason;
    
public voidsetReason(short reason)
Sets the reason code.

param
reason the reason for the exception
see
#getReason

	this.reason = reason;
    
public static voidthrowIt(short reason)
Throws an instance of the CardRuntimeException class with the specified reason.

param
reason the reason for the exception
exception
CardRuntimeException always

  
	throw new CardRuntimeException(reason);