|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--attrib4j.AttributeException
It allows you nest exceptions. This results in simplifing the external API of a package or library. Implementation inspired from various placed, most recently Javaworld, Javatips #91. Now included as part of J2SE 1.4
| Constructor Summary | |
AttributeException()
Do nothing constructor. |
|
AttributeException(java.lang.String message)
Creates a new AttributeException instance. |
|
AttributeException(java.lang.String message,
java.lang.Throwable rootCause)
Create a new AttributeException instance. |
|
AttributeException(java.lang.Throwable rootCause)
Create an exception nesting the rootCause of this exception. |
|
| Method Summary | |
java.lang.String |
getMessage()
Override Exceptipn.getMessage to include information of the root cause of the exception. |
java.lang.Throwable |
getRootCause()
Get the exception that caused this exception to be raised. |
java.lang.String |
getStackTraceString()
Return the stack trace including root cause exceptions. |
void |
printStackTrace()
Override default behavior |
void |
printStackTrace(java.io.PrintStream inPrintStream)
Override default behavior |
void |
printStackTrace(java.io.PrintWriter inPrintWriter)
Override default behavior |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AttributeException()
public AttributeException(java.lang.String message)
AttributeException instance.
message - a String valuepublic AttributeException(java.lang.Throwable rootCause)
rootCause - a value of type 'Throwable'.
public AttributeException(java.lang.String message,
java.lang.Throwable rootCause)
AttributeException instance. Allows for
an association of an originating exception.
message - Message of the exception.
message of the exception.rootCause - The exception that caused this exception to be raised.| Method Detail |
public java.lang.Throwable getRootCause()
public java.lang.String getStackTraceString()
public java.lang.String getMessage()
getMessage in class java.lang.Throwablepublic java.lang.String toString()
toString in class java.lang.Throwablepublic void printStackTrace()
printStackTrace in class java.lang.Throwablepublic void printStackTrace(java.io.PrintStream inPrintStream)
printStackTrace in class java.lang.Throwablepublic void printStackTrace(java.io.PrintWriter inPrintWriter)
printStackTrace in class java.lang.Throwable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||