public class SimpleExceptionReport extends java.lang.Object implements ExceptionReportGenerator
ExceptionReportGenerator
implementation that inserts the entire stack trace of the exception as the configured element.
Currently the only ExceptionReportGenerator
implementation, this can be used as part of a ExceptionReportService
to add the stack trace of the exception wrapped as an XML element of your choosing (as dictated by
setElementName(String)
). The data in the element itself is wrapped in a CDATA tag.
In the adapter configuration file this class is aliased as simple-exception-report which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
SimpleExceptionReport() |
SimpleExceptionReport(java.lang.String elementName) |
Modifier and Type | Method and Description |
---|---|
org.w3c.dom.Document |
create(java.lang.Exception e,
java.lang.String workflow,
java.lang.String location)
Create a Document from the exception.
|
java.lang.String |
getElementName() |
void |
setElementName(java.lang.String s)
Set the element name for the stack trace.
|
public SimpleExceptionReport()
public SimpleExceptionReport(java.lang.String elementName)
public org.w3c.dom.Document create(java.lang.Exception e, java.lang.String workflow, java.lang.String location) throws java.lang.Exception
ExceptionReportGenerator
create
in interface ExceptionReportGenerator
e
- the exceptionworkflow
- the workflow where it happenedlocation
- where in the workflow it happened.java.lang.Exception
- on error.public java.lang.String getElementName()
public void setElementName(java.lang.String s)
s
- the element name, if not specified defaults to Exception