Class DefaultErrorMessageStrategy
java.lang.Object
org.springframework.integration.support.DefaultErrorMessageStrategy
- All Implemented Interfaces:
ErrorMessageStrategy
public class DefaultErrorMessageStrategy extends java.lang.Object implements ErrorMessageStrategy
A simple
ErrorMessageStrategy
implementations which produces
a error message with original message if the AttributeAccessor
has
ErrorMessageUtils.INPUT_MESSAGE_CONTEXT_KEY
attribute.
Otherwise plain ErrorMessage
with the throwable
as payload
.- Since:
- 4.3.10
- See Also:
ErrorMessageUtils
-
Constructor Summary
Constructors Constructor Description DefaultErrorMessageStrategy()
-
Method Summary
Modifier and Type Method Description org.springframework.messaging.support.ErrorMessage
buildErrorMessage(java.lang.Throwable throwable, org.springframework.core.AttributeAccessor attributes)
Build the error message.
-
Constructor Details
-
DefaultErrorMessageStrategy
public DefaultErrorMessageStrategy()
-
-
Method Details
-
buildErrorMessage
public org.springframework.messaging.support.ErrorMessage buildErrorMessage(java.lang.Throwable throwable, @Nullable org.springframework.core.AttributeAccessor attributes)Description copied from interface:ErrorMessageStrategy
Build the error message.- Specified by:
buildErrorMessage
in interfaceErrorMessageStrategy
- Parameters:
throwable
- the payload.attributes
- the attributes.- Returns:
- the ErrorMessage.
-