|
jCookie v0.8b | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Allows implementing classes to contain an
application-specific error code, the class and
method of origin, a data Object
,
and any underlying (causal) Exception
.
These enhancements are described below :-
IEnhancedException
instance was
created.Object
allows
this IEnhancedException
instance to pass some
information up the stack.IEnhancedException
.
"Exception chaining" is possible if the causal exception is also
an instance of IEnhancedException
.
Following are some guidelines for implementations :-
Exception
(or one of its subclasses).
NOTE: Direct implementing classes DO NOT follow the same hierarchy
as followed by the Exception
s in the core Java packages. For example,
EnhancedIOException
is NOT a direct subclass of EnhancedException
,
even though IOException
is a direct subclass of Exception
. In other
words, (EnhancedIOException instanceof EnhancedException)
returns false
even though (IOException instanceof Exception)
returns true
.
Exception
,
EnhancedException
,
EnhancedIOException
Method Summary | |
Exception |
getCausalException()
Returns the underlying Exception (if any) for this instance. |
String |
getCode()
Returns the application-specific error code associated with this instance. |
Object |
getDataObject()
Returns the data object (if any) set by the originator. |
String |
getOriginClass()
Returns the fully-qualified name of the class which constructed this instance. |
String |
getOriginMethod()
Returns the name of the method in which this instance was constructed. |
void |
removeDataObject()
Removes the data object (if any) contained in this instance. |
Method Detail |
public String getOriginClass()
String
representing the class of origin ;
"UNKNOWN" if it was not set.public String getOriginMethod()
String
representing the method of origin ;
"UNKNOWN" if it was not set.public String getCode()
String
representing the error code ;
"UNSPECIFIED" if it was not set.public Exception getCausalException()
Exception
(if any) for this instance.Exception
;
null
if there is none.public Object getDataObject()
Object
; null
if there is none.public void removeDataObject()
|
Copyright (c) 2001-2002 Sonal Bansal | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |