public class TException
extends java.lang.Exception
Constructor and Description |
---|
TException(java.util.Locale locale)
Initializes a TException instance without a specific detail message.
|
TException(java.lang.String message,
java.util.Locale locale)
Initializes a TException instance with a message and an internal nested exception.
|
TException(java.lang.String message,
java.lang.Throwable nestedException,
java.util.Locale locale)
Initializes a TException instance with a message and an internal nested exception.
|
TException(java.lang.Throwable nestedException,
java.util.Locale locale)
Initializes a TException instance with a nested exception.
|
TException(TResourceId resourceId,
java.util.Locale locale)
Initializes a TException instance with a resource message.
|
TException(TResourceId resourceId,
java.lang.Throwable nestedException,
java.util.Locale locale)
Initializes a TException instance with a resource message and an internal nested exception.
|
Modifier and Type | Method and Description |
---|---|
TAccessFailureException |
getAccessFailureException()
Gets the TAccessFailureException nested within this TException.
|
protected org.w3c.dom.Element |
getAdditionalXMLMessageContent(org.w3c.dom.Document document)
Gets an additional message content part.
|
java.lang.Throwable |
getCause()
Gets the internal nested exception, null if none is given.
|
java.lang.Throwable |
getDeepestException()
Deprecated.
please use getRootCause() instead.
|
TException |
getDeepestTException()
Gets the deepest TException instance in the nested exceptions.
|
com.softwareag.common.resourceutilities.message.Message |
getExceptionMessage()
Gets the resource message instance of this exception
|
java.util.Locale |
getLocale()
Gets the locale.
|
java.lang.String |
getMessageCode()
Gets the message code.
|
java.lang.String |
getMessageContent()
Gets the message content.
|
java.lang.Throwable |
getNestedException()
Deprecated.
please use getCause() instead.
|
com.softwareag.common.resourceutilities.message.ResourceMessage |
getResourceMessage()
Deprecated.
please use getExceptionMessage() instead.
|
java.lang.Throwable |
getRootCause()
Gets deepest nested exception in all the nested exceptions.
|
TException |
getRootTCause()
Gets the deepest TException instance in the chained exceptions.
|
java.lang.String |
getXMLMessage()
Gets the complete exception message as XML string, like
It will be of the following form. |
protected org.w3c.dom.Element |
getXMLMessage(org.w3c.dom.Document document)
Gets the complete exception message as an DOM-Element.
|
boolean |
hasAccessFailureException()
Indicates if exception contains a TAccessFailureException nested within this TException.
|
boolean |
hasCause()
Indicates if exception contains a cause (chained exception).
|
boolean |
hasNestedException()
Deprecated.
please use hasCause().
|
void |
printStackTrace()
Prints the stacktrace.
|
void |
printStackTrace(java.io.PrintStream stream)
Prints this Exception and its backtrace to the specified print stream.
|
void |
printStackTrace(java.io.PrintWriter writer)
Prints this Exception and its backtrace to the specified print writer.
|
void |
setLocale(java.util.Locale locale)
Sets the locale.
|
java.lang.String |
toString()
Returns the tring representation of the TException instance.
|
java.lang.String |
toXMLString()
Returns the xml string representation of the TException instance.
|
public TException(java.util.Locale locale)
locale
- the localepublic TException(java.lang.String message, java.util.Locale locale)
message
- is handed further to the base class.locale
- the localepublic TException(java.lang.String message, java.lang.Throwable nestedException, java.util.Locale locale)
message
- is handed further to the base class.nestedException
- can be nested into a TException if it is given.locale
- the localepublic TException(TResourceId resourceId, java.util.Locale locale)
resourceId
- containing the message of this exceptionlocale
- the localeTResourceId
public TException(TResourceId resourceId, java.lang.Throwable nestedException, java.util.Locale locale)
resourceId
- containing the message of this exceptionnestedException
- can be nested into a TException if it is givenlocale
- the localeTResourceId
public TException(java.lang.Throwable nestedException, java.util.Locale locale)
nestedException
- can be nested into a TException if it is givenlocale
- the localepublic java.lang.String getMessageCode()
public java.lang.String getMessageContent()
public java.lang.String getXMLMessage()
<exception name="TException"> <message> <!-- message specific content --> </message> <failureMessage name="TAccessFailureMessage"> <!-- failure message specific content --> </failureMessage> <exception name=".."> <!-- nested exeption (recursivly) --> <exception> </exception>
protected org.w3c.dom.Element getXMLMessage(org.w3c.dom.Document document)
document
- the document to use for building elements for.protected org.w3c.dom.Element getAdditionalXMLMessageContent(org.w3c.dom.Document document)
public com.softwareag.common.resourceutilities.message.ResourceMessage getResourceMessage()
public com.softwareag.common.resourceutilities.message.Message getExceptionMessage()
public void setLocale(java.util.Locale locale)
public java.util.Locale getLocale()
public boolean hasNestedException()
public boolean hasCause()
public boolean hasAccessFailureException()
public java.lang.Throwable getNestedException()
public java.lang.Throwable getCause()
getCause
in class java.lang.Throwable
public java.lang.Throwable getDeepestException()
public java.lang.Throwable getRootCause()
public TException getDeepestTException()
public TException getRootTCause()
public TAccessFailureException getAccessFailureException()
public void printStackTrace()
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream stream)
printStackTrace
in class java.lang.Throwable
stream
- - PrintStream to use for outputpublic void printStackTrace(java.io.PrintWriter writer)
printStackTrace
in class java.lang.Throwable
writer
- - PrintWriter to use for outputpublic java.lang.String toXMLString()
public java.lang.String toString()
toString
in class java.lang.Throwable
Copyright (c) 2016 Software AG. All Rights Reserved.