Groovy Documentation

org.devnull.error.web.resolver
[Groovy] Class DefaultErrorResolver

java.lang.Object
  org.devnull.error.web.resolver.DefaultErrorResolver
All Implemented Interfaces:
org.springframework.web.servlet.HandlerExceptionResolver

@Slf4j
class DefaultErrorResolver
extends java.lang.Object

Renders HttpErrorMessages as HTML to HTTP clients


Property Summary
static java.lang.String MODEL_ATTRIBUTE_ERROR_MESSAGE

java.lang.String defaultView

View to use if a HTTP status mapping is not found

HttpErrorMessageConverter httpErrorMessageConverter

Converts an exception to an appropriate HttpErrorMessage

java.util.Map statusToViewMappings

 
Method Summary
org.springframework.web.servlet.ModelAndView resolveException(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object handler, java.lang.Exception ex)

Converts the exception to a HttpErrorMessage and passes it to the configured view in the model (errorMessage)

 
Methods inherited from class java.lang.Object
java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long)
 

Property Detail

MODEL_ATTRIBUTE_ERROR_MESSAGE

static final java.lang.String MODEL_ATTRIBUTE_ERROR_MESSAGE


defaultView

java.lang.String defaultView
View to use if a HTTP status mapping is not found


httpErrorMessageConverter

HttpErrorMessageConverter httpErrorMessageConverter
Converts an exception to an appropriate HttpErrorMessage


statusToViewMappings

java.util.Map statusToViewMappings

Mapping of HTTP status codes to views to render upon error. Http status code is determined by the HttpErrorMessage created from the httpErrorMessageConverter

Defaults:


 
Method Detail

resolveException

org.springframework.web.servlet.ModelAndView resolveException(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object handler, java.lang.Exception ex)
Converts the exception to a HttpErrorMessage and passes it to the configured view in the model (errorMessage)


 

Groovy Documentation