Interface ErrorAttributes
- All Known Implementing Classes:
DefaultErrorAttributes
public interface ErrorAttributes
Provides access to error attributes which can be logged or presented to the user.- Since:
- 2.0.0
- See Also:
DefaultErrorAttributes
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Throwable
getError(org.springframework.web.context.request.WebRequest webRequest)
Return the underlying cause of the error ornull
if the error cannot be extracted.Map<String,Object>
getErrorAttributes(org.springframework.web.context.request.WebRequest webRequest, boolean includeStackTrace)
Returns aMap
of the error attributes.
Method Detail
getErrorAttributes
Map<String,Object> getErrorAttributes(org.springframework.web.context.request.WebRequest webRequest, boolean includeStackTrace)
Returns aMap
of the error attributes. The map can be used as the model of an error pageModelAndView
, or returned as aResponseBody
.- Parameters:
webRequest
- the source requestincludeStackTrace
- if stack trace elements should be included- Returns:
- a map of error attributes