|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
javacardx.framework.ApplicationException
public final class ApplicationException
The class ApplicationException
encapsulates generic checked
exceptions that an application may throw.
The ApplicationException class provides a generic means for some auxiliary (e.g., application-defined) information to be set in the exception. The actual semantics of this information may be specific to the application throwing the exception.
A typical use case for this class is for exceptions thrown by methods of an SIO-based service or event.
Instances of this exception class are not bound to any context and can be
passed between contexts without any restrictions. Objects created and returned
by the methods of this class are owned by the caller. In particular, a call to the Throwable.getMessage()
returns a String instance bound to the owner context of the caller. Note though that
this is not the case for the getInfo()
method; this method returns the
same object that was passed to the constructor.
See Runtime Environment Specification for the Java Card Platform, Connected Edition, chapter 7 for details regarding transfer of ownership.
Constructor Summary | |
---|---|
ApplicationException()
Constructs an ApplicationException with no (null) detail
message and no (null) auxiliary application-defined information. |
|
ApplicationException(String message)
Constructs an ApplicationException with a detail message and
no (null) auxiliary application-defined information. |
|
ApplicationException(String message,
Object info)
Constructs an ApplicationException with a detail message and
auxiliary (e.g., application-defined) information. |
Method Summary | |
---|---|
Object |
getInfo()
Returns the auxiliary (e.g., application-defined) information. |
Methods inherited from class java.lang.Throwable |
---|
getMessage, printStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ApplicationException(String message, Object info)
ApplicationException
with a detail message and
auxiliary (e.g., application-defined) information. Developers must account
for context isolation and should typically provide the auxiliary
information in the form of an SIO or an "implicitly
transferable" object (or even an "explicitly transferable"
object whose ownership has been transferred to the application intended
to catch the exception).
message
- the detail message (a null
is permitted).info
- the auxiliary information (a null
is permitted).public ApplicationException(String message)
ApplicationException
with a detail message and
no (null) auxiliary application-defined information.
message
- the detail message (a null
is permitted).public ApplicationException()
ApplicationException
with no (null) detail
message and no (null) auxiliary application-defined information.
Method Detail |
---|
public Object getInfo()
null
if no auxiliary
information was provided.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |