|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.util.AbstractXmlObject
com.waveset.object.ResultError
A class used to represent information about an error that happened during some operation, which needs to be stored in a WavesetResult object.
These will be found in ResultItem objects whose type is "error". There are two basic ways to build one of these:
Field Summary | |
static java.lang.String |
ATT_THROWABLE
|
static java.lang.String |
code_id
|
static java.lang.String |
EL_STACK
|
static java.lang.String |
ELEMENT
Our XML element name. |
static java.lang.String |
ITEM_TYPE
The ResultItem type name for these. |
Fields inherited from class com.waveset.util.AbstractXmlObject |
_trace |
Constructor Summary | |
ResultError()
Build an empty error object, which can be populated manually. |
|
ResultError(org.w3c.dom.Element e)
Build an error object by parsing its DOM representation. |
|
ResultError(Message msg)
Build an error object that captures a single Message object. |
|
ResultError(java.lang.Throwable t)
Build an error object that captures the state of a Throwable. |
Method Summary | |
java.lang.String |
getElementName()
Return the XML element name, required by AbstractXmlObject. |
java.lang.String |
getFirstStackTrace()
Get the stack trace of the innermost nested error. |
java.lang.String |
getMessage()
Render the message hierarchy as a string in the current locale. |
java.lang.String |
getMessage(java.util.Locale locale)
Render the message hierarchy as a string. |
Message[] |
getMessages()
Get the array of message objects. |
ResultError[] |
getNestedErrors()
Get the nested error objects, if this error was constructed from a list of wrapped exceptions. |
java.lang.String |
getStackTrace()
Get the stack trace found on the Throwable object from which this error object was built. |
java.lang.String |
getThrowableClass()
Get the name of the Throwable class from which this error object was built. |
void |
setMessages(Message[] msgs)
Set the array of message objects. |
void |
setNestedErrors(ResultError[] e)
Set the nested error objects. |
void |
setStackTrace(java.lang.String s)
Get the stack trace found on the Throwable object from which this error object was built. |
void |
setThrowableClass(java.lang.String name)
Set the name of the Throwable class from which this error object was built. |
java.lang.String |
toString()
|
void |
toXml(java.lang.StringBuffer b,
int indent)
Serialize into a buffer with optional indentation. |
Methods inherited from class com.waveset.util.AbstractXmlObject |
addXmlHeader, cloneObject, dump, dumpFile, getReference, println, setTrace, toIdentityString, toVerboseString, toVerboseString, toXml, toXml, toXml |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String ELEMENT
public static final java.lang.String ITEM_TYPE
public static final java.lang.String ATT_THROWABLE
public static final java.lang.String EL_STACK
Constructor Detail |
public ResultError()
public ResultError(Message msg)
public ResultError(java.lang.Throwable t)
public ResultError(org.w3c.dom.Element e) throws WavesetException
Method Detail |
public java.lang.String getElementName()
getElementName
in interface XmlObject
getElementName
in class AbstractXmlObject
public Message[] getMessages()
public void setMessages(Message[] msgs)
public ResultError[] getNestedErrors()
public void setNestedErrors(ResultError[] e)
public java.lang.String getThrowableClass()
We return the name of the class rather than a Class object, since the code examining the ResultError is not necessarily in a context that is able to instantiate the throwable class.
public void setThrowableClass(java.lang.String name)
public java.lang.String getStackTrace()
public void setStackTrace(java.lang.String s)
public java.lang.String getFirstStackTrace()
If there is more than one wrapped exception, we follow the leftmost path.
public java.lang.String getMessage(java.util.Locale locale)
public java.lang.String getMessage()
public java.lang.String toString()
public void toXml(java.lang.StringBuffer b, int indent)
AbstractXmlObject
toXml
in interface XmlObject
toXml
in class AbstractXmlObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |