public interface ErrorAttributes
DefaultErrorAttributes
Modifier and Type | Method and Description |
---|---|
Throwable |
getError(WebRequest webRequest)
Return the underlying cause of the error or
null if the error cannot be
extracted. |
Map<String,Object> |
getErrorAttributes(WebRequest webRequest,
boolean includeStackTrace)
Deprecated.
since 2.3.0 in favor of
getErrorAttributes(WebRequest, boolean, boolean, boolean) |
Map<String,Object> |
getErrorAttributes(WebRequest webRequest,
boolean includeStackTrace,
boolean includeMessage,
boolean includeBindingErrors)
Returns a
Map of the error attributes. |
@Deprecated Map<String,Object> getErrorAttributes(WebRequest webRequest, boolean includeStackTrace)
getErrorAttributes(WebRequest, boolean, boolean, boolean)
Map
of the error attributes. The map can be used as the model of
an error page ModelAndView
, or returned as a
@ResponseBody
.webRequest
- the source requestincludeStackTrace
- if stack trace element should be includedMap<String,Object> getErrorAttributes(WebRequest webRequest, boolean includeStackTrace, boolean includeMessage, boolean includeBindingErrors)
Map
of the error attributes. The map can be used as the model of
an error page ModelAndView
, or returned as a
@ResponseBody
.webRequest
- the source requestincludeStackTrace
- if stack trace element should be includedincludeMessage
- if message element should be includedincludeBindingErrors
- if errors element should be includedThrowable getError(WebRequest webRequest)
null
if the error cannot be
extracted.webRequest
- the source requestException
that caused the error or null