Class SimpleExceptionReport

  • All Implemented Interfaces:
    ExceptionReportGenerator

    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.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleExceptionReport

        public SimpleExceptionReport()
      • SimpleExceptionReport

        public SimpleExceptionReport​(java.lang.String elementName)
    • Method Detail

      • create

        public org.w3c.dom.Document create​(java.lang.Exception e,
                                           java.lang.String workflow,
                                           java.lang.String location)
                                    throws java.lang.Exception
        Description copied from interface: ExceptionReportGenerator
        Create a Document from the exception.
        Specified by:
        create in interface ExceptionReportGenerator
        Parameters:
        e - the exception
        workflow - the workflow where it happened
        location - where in the workflow it happened.
        Returns:
        a document ready to be merged.
        Throws:
        java.lang.Exception - on error.
      • getElementName

        public java.lang.String getElementName()
      • setElementName

        public void setElementName​(java.lang.String s)
        Set the element name for the stack trace.
        Parameters:
        s - the element name, if not specified defaults to Exception