public class DefaultErrorMessageStrategy extends Object implements ErrorMessageStrategy
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
.ErrorMessageUtils
Constructor and Description |
---|
DefaultErrorMessageStrategy() |
Modifier and Type | Method and Description |
---|---|
ErrorMessage |
buildErrorMessage(Throwable throwable,
AttributeAccessor attributes)
Build the error message.
|
public ErrorMessage buildErrorMessage(Throwable throwable, @Nullable AttributeAccessor attributes)
ErrorMessageStrategy
buildErrorMessage
in interface ErrorMessageStrategy
throwable
- the payload.attributes
- the attributes.