public class CardException
extends java.lang.Exception
CardException
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 checked exception classes should extend
CardException
.Constructor and Description |
---|
CardException(short reason)
Constructs a
CardException 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 an instance of
CardException class with the
specified reason. |
public CardException(short reason)
CardException
instance with the
specified reason.reason
- the reason for the exceptionpublic short getReason()
setReason(short)
public void setReason(short reason)
reason
- the reason for the exceptiongetReason()
public static void throwIt(short reason) throws CardException
CardException
class with the
specified reason.reason
- the reason for the exceptionCardException
- alwaysCopyright © 2013, Oracle and/or its affiliates. All rights reserved.
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.