Class ErrorMessageFormatter
java.lang.Object
org.frankframework.errormessageformatters.ErrorMessageFormatter
- All Implemented Interfaces:
IErrorMessageFormatter
,IScopeProvider
- Direct Known Subclasses:
DataSonnetErrorMessageFormatter
,FixedErrorMessageFormatter
,SoapErrorMessageFormatter
,XslErrorMessageFormatter
This class wraps an error in an XML string.
Sample xml:
<errorMessage>
<message timestamp="Mon Oct 13 12:01:57 CEST 2003"
originator="NN IOS AdapterFramework(set from 'application.name' and 'application.version')"
message="message describing the error that occurred">
<location class="org.frankframework.pipes.XmlSwitch" name="ServiceSwitch"/>
<details>detailed information of the error</details>
<originalMessage messageId="..." receivedTime="Mon Oct 27 12:10:18 CET 2003" >
<![CDATA[contents of message for which the error occurred]]>
</originalMessage>
</errorMessage>
- Author:
- Gerrit van Brakel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformat
(String errorMessage, Throwable t, HasName location, Message originalMessage, PipeLineSession session) Format the available parameters into a XML-message.protected String
getErrorMessage
(String message, Throwable t) void
setMessageFormat
(DocumentFormat messageFormat) Format the error message as XML or as JSON.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.frankframework.core.IScopeProvider
getConfigurationClassLoader
-
Constructor Details
-
ErrorMessageFormatter
public ErrorMessageFormatter()
-
-
Method Details
-
format
public Message format(String errorMessage, Throwable t, HasName location, Message originalMessage, PipeLineSession session) Format the available parameters into a XML-message.
Override this method in subclasses to obtain the required behaviour.- Specified by:
format
in interfaceIErrorMessageFormatter
-
getErrorMessage
-
setMessageFormat
Format the error message as XML or as JSON. ff.default XML
-