|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.teiid.test.framework.exception.QueryTestFailedException
public class QueryTestFailedException
The QueryTestFailedException is thrown during a test. This exception which contains a reference to another exception. This class can be used to maintain a linked list of exceptions.
Subclasses of this exception typically only need to implement whatever constructors they need.
Constructor Summary | |
---|---|
QueryTestFailedException()
Construct a default instance of this class. |
|
QueryTestFailedException(java.lang.String message)
Construct an instance with the specified error message. |
|
QueryTestFailedException(java.lang.String code,
java.lang.String message)
Construct an instance with the specified error code and message. |
|
QueryTestFailedException(java.lang.Throwable e)
Construct an instance with a linked exception specified. |
|
QueryTestFailedException(java.lang.Throwable e,
java.lang.String message)
Construct an instance with the linked exception and error message specified. |
|
QueryTestFailedException(java.lang.Throwable e,
java.lang.String code,
java.lang.String message)
Construct an instance with the linked exception, error code, and error message specified. |
Method Summary | |
---|---|
java.lang.Throwable |
getChild()
Get the exception which is linked to this exception. |
static java.lang.String |
getClassShortName(java.lang.Class<?> cls)
Utility method to get the name of a class, without package information. |
java.lang.String |
getCode()
Get the error code. |
java.lang.String |
getFormattedMessage(java.lang.Throwable throwable,
int level)
Returns the error message, formatted for output. |
java.lang.String |
getFullMessage()
Get the full error message, including any message(s) from child exceptions. |
java.lang.String |
getMessage()
|
void |
setChild(java.lang.Throwable child)
Set the exception which is linked to this exception. |
void |
setCode(java.lang.String code)
Set the error code. |
java.lang.String |
toString()
Returns a string representation of this class. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QueryTestFailedException()
public QueryTestFailedException(java.lang.String message)
message
- The error message or a resource bundle keypublic QueryTestFailedException(java.lang.String code, java.lang.String message)
code
- The error codemessage
- The error message or a resource bundle keypublic QueryTestFailedException(java.lang.Throwable e)
TeiidRuntimeException
, then the code will be set to the exception's code.
e
- An exception to chain to this exceptionpublic QueryTestFailedException(java.lang.Throwable e, java.lang.String message)
TeiidRuntimeException
, the code will be set to the exception's code.
e
- The exception to chain to this exceptionmessage
- The error message or a resource bundle keypublic QueryTestFailedException(java.lang.Throwable e, java.lang.String code, java.lang.String message)
e
- The exception to chain to this exceptioncode
- The error codemessage
- The error message or a resource bundle keyMethod Detail |
---|
public static java.lang.String getClassShortName(java.lang.Class<?> cls)
cls
- The class to get the name of
public java.lang.Throwable getChild()
public java.lang.String getCode()
public java.lang.String getFormattedMessage(java.lang.Throwable throwable, int level)
The default formatting provided by this method is to prepend the error message with the level and the name of the class, and to append the error code on the end if a non-zero code is defined.
This method provides a hook for subclasses to override the default formatting of any one exception.
except
- The exception to printlevel
- The depth of the exception in the chain of exceptions
public java.lang.String getFullMessage()
getFormattedMessage(java.lang.Throwable, int)
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public void setChild(java.lang.Throwable child)
For the special case of an InvocationTargetException, which is
a wrapped exception provided in the java.lang.reflect
package, the child is set to the wrapped exception, and the message,
if not yet defined, is set to the message of the wrapped exception.
child
- The linked exceptionpublic void setCode(java.lang.String code)
code
- The error codepublic java.lang.String toString()
toString
in class java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |