|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IEnhancedException
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 Exceptions 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 | |
|---|---|
java.lang.Exception |
getCausalException()
Returns the underlying Exception (if any) for this instance. |
java.lang.String |
getCode()
Returns the application-specific error code associated with this instance. |
java.lang.Object |
getDataObject()
Returns the data object (if any) set by the originator. |
java.lang.String |
getOriginClass()
Returns the fully-qualified name of the class which constructed this instance. |
java.lang.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 |
|---|
java.lang.String getOriginClass()
String representing the class of origin ;
"UNKNOWN" if it was not set.java.lang.String getOriginMethod()
String representing the method of origin ;
"UNKNOWN" if it was not set.java.lang.String getCode()
String representing the error code ;
"UNSPECIFIED" if it was not set.java.lang.Exception getCausalException()
Exception (if any) for this instance.
Exception ;
null if there is none.java.lang.Object getDataObject()
Object ; null if there is none.void removeDataObject()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||