Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sonalb
Interface IEnhancedException  view IEnhancedException download IEnhancedException.java

All Known Implementing Classes:
EnhancedException, EnhancedIOException, EnhancedRuntimeException

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 :-

Following are some guidelines for implementations :-

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.


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

getOriginClass

public java.lang.String getOriginClass()
Returns the fully-qualified name of the class which constructed this instance.


getOriginMethod

public java.lang.String getOriginMethod()
Returns the name of the method in which this instance was constructed.


getCode

public java.lang.String getCode()
Returns the application-specific error code associated with this instance.


getCausalException

public java.lang.Exception getCausalException()
Returns the underlying Exception (if any) for this instance.


getDataObject

public java.lang.Object getDataObject()
Returns the data object (if any) set by the originator.


removeDataObject

public void removeDataObject()
Removes the data object (if any) contained in this instance.