|
|||||||||
| Home >> All >> org >> hibernate >> [ exception overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.hibernate.exception
Interface Nestable

- All Known Implementing Classes:
- NestableException, NestableRuntimeException
- public interface Nestable
An interface to be implemented by java.lang.Throwable extensions which would like to be able to nest root exceptions inside themselves.
- Since:
- 1.0
- Version:
- $Id: Nestable.java 4782 2004-11-21 00:11:27Z pgmjsd $
| Method Summary | |
java.lang.Throwable |
getCause()
Returns the reference to the exception or error that caused the exception implementing the Nestable to be thrown. |
java.lang.String |
getMessage()
Returns the error message of this and any nested Throwable. |
java.lang.String |
getMessage(int index)
Returns the error message of the Throwable in the chain
of Throwables at the specified index, numbererd from 0. |
java.lang.String[] |
getMessages()
Returns the error message of this and any nested Throwables
in an array of Strings, one element for each message. |
java.lang.Throwable |
getThrowable(int index)
Returns the Throwable in the chain of
Throwables at the specified index, numbererd from 0. |
int |
getThrowableCount()
Returns the number of nested Throwables represented by
this Nestable, including this Nestable. |
java.lang.Throwable[] |
getThrowables()
Returns this Nestable and any nested Throwables
in an array of Throwables, one element for each
Throwable. |
int |
indexOfThrowable(java.lang.Class type)
Returns the index, numbered from 0, of the first occurrence of the specified type in the chain of Throwables, or -1 if the
specified type is not found in the chain. |
int |
indexOfThrowable(java.lang.Class type,
int fromIndex)
Returns the index, numbered from 0, of the first Throwable
that matches the specified type in the chain of Throwables
with an index greater than or equal to the specified index, or -1 if
the type is not found. |
void |
printPartialStackTrace(java.io.PrintWriter out)
Prints the stack trace for this exception only--root cause not included--using the provided writer. |
void |
printStackTrace(java.io.PrintStream out)
Prints the stack trace of this exception to the specified print stream. |
void |
printStackTrace(java.io.PrintWriter out)
Prints the stack trace of this exception to the specified print writer. |
| Method Detail |
getCause
public java.lang.Throwable getCause()
- Returns the reference to the exception or error that caused the
exception implementing the
Nestableto be thrown.
getMessage
public java.lang.String getMessage()
- Returns the error message of this and any nested
Throwable.
getMessage
public java.lang.String getMessage(int index)
- Returns the error message of the
Throwablein the chain ofThrowables at the specified index, numbererd from 0.
getMessages
public java.lang.String[] getMessages()
- Returns the error message of this and any nested
Throwables in an array of Strings, one element for each message. AnyThrowablenot containing a message is represented in the array by a null. This has the effect of cause the length of the returned array to be equal to the result of thegetThrowableCount()55 operation.
getThrowable
public java.lang.Throwable getThrowable(int index)
- Returns the
Throwablein the chain ofThrowables at the specified index, numbererd from 0.
getThrowableCount
public int getThrowableCount()
- Returns the number of nested
Throwables represented by thisNestable, including thisNestable.
getThrowables
public java.lang.Throwable[] getThrowables()
- Returns this
Nestableand any nestedThrowables in an array ofThrowables, one element for eachThrowable.
indexOfThrowable
public int indexOfThrowable(java.lang.Class type)
- Returns the index, numbered from 0, of the first occurrence of the
specified type in the chain of
Throwables, or -1 if the specified type is not found in the chain.
indexOfThrowable
public int indexOfThrowable(java.lang.Class type, int fromIndex)
- Returns the index, numbered from 0, of the first
Throwablethat matches the specified type in the chain ofThrowables with an index greater than or equal to the specified index, or -1 if the type is not found.
printStackTrace
public void printStackTrace(java.io.PrintWriter out)
- Prints the stack trace of this exception to the specified print
writer. Includes information from the exception, if any,
which caused this exception.
printStackTrace
public void printStackTrace(java.io.PrintStream out)
- Prints the stack trace of this exception to the specified print
stream. Includes inforamation from the exception, if any,
which caused this exception.
printPartialStackTrace
public void printPartialStackTrace(java.io.PrintWriter out)
- Prints the stack trace for this exception only--root cause not
included--using the provided writer. Used by
org.apache.commons.lang.exception.NestableDelegateto write individual stack traces to a buffer. The implementation of this method should callsuper.printStackTrace(out);in most cases.
|
|||||||||
| Home >> All >> org >> hibernate >> [ exception overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC