|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.core.util.MetaMatrixExceptionUtil
public class MetaMatrixExceptionUtil
Utility class that provides some useful things for users of the com.metamatrix.api.exception package. Also provides package-level functionality that is shared among classes in this package.
Nested Class Summary | |
---|---|
static class |
MetaMatrixExceptionUtil.NestedExceptionIterator
An Iterator over any nested children Throwable s
of either a MetaMatrixException or a MetaMatrixRuntimeException. |
Method Summary | |
---|---|
static java.util.Iterator |
getChildrenIterator(java.lang.Throwable e)
Convenience method that takes any Throwable and returns an appropriate Iterator over any nested exceptions in that Throwable. |
static java.lang.String |
getLinkedMessages(java.lang.Throwable exception)
|
static java.lang.String |
getLinkedMessages(java.lang.Throwable exception,
int level)
Get the chain of messages, starting with the specified exception. |
static java.lang.String |
getLinkedMessagesVerbose(java.lang.Throwable exception)
|
static java.lang.String |
getLinkedMessagesVerbose(java.lang.Throwable exception,
int level)
|
static void |
printNestedStackTrace(java.lang.Throwable exception,
java.io.PrintStream output)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.util.Iterator getChildrenIterator(java.lang.Throwable e)
MetaMatrixException.getChildren()
or
MetaMatrixRuntimeException.getChildren()
.
Otherwise, a non-null "empty" Iterator is returned, one that simply has
no Objects in it.
e
- any Throwable
public static void printNestedStackTrace(java.lang.Throwable exception, java.io.PrintStream output)
public static java.lang.String getLinkedMessagesVerbose(java.lang.Throwable exception)
public static java.lang.String getLinkedMessagesVerbose(java.lang.Throwable exception, int level)
public static java.lang.String getLinkedMessages(java.lang.Throwable exception)
public static java.lang.String getLinkedMessages(java.lang.Throwable exception, int level)
This method calls the getMessage
method for the exception
passed in, and appends on the result returned from a recursive call to
this method for the child of the passed in exception. The passed in
exception is updated on each recursive call to be the child of the
original exception, and the level is incremented on each call.
exception
- The exception to print the chained message list oflevel
- (zero-based) The depth of the exception parameter in
the chain of exceptions.messageFormatter
- the formatter of the message; may not be null
Throwable.getMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |