public class HandlerExceptionResolverComposite extends Object implements HandlerExceptionResolver, Ordered
HandlerExceptionResolver
that delegates to a list of other HandlerExceptionResolver
s.HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
HandlerExceptionResolverComposite() |
Modifier and Type | Method and Description |
---|---|
List<HandlerExceptionResolver> |
getExceptionResolvers()
Return the list of exception resolvers to delegate to.
|
int |
getOrder()
Return the order value of this object, with a
higher value meaning greater in terms of sorting.
|
ModelAndView |
resolveException(HttpServletRequest request,
HttpServletResponse response,
Object handler,
Exception ex)
Resolve the exception by iterating over the list of configured exception resolvers.
|
void |
setExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers)
Set the list of exception resolvers to delegate to.
|
void |
setOrder(int order) |
public void setOrder(int order)
public int getOrder()
Ordered
Normally starting with 0, with Integer.MAX_VALUE
indicating the greatest value. Same order values will result
in arbitrary positions for the affected objects.
Higher values can be interpreted as lower priority. As a consequence, the object with the lowest value has highest priority (somewhat analogous to Servlet "load-on-startup" values).
public void setExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers)
public List<HandlerExceptionResolver> getExceptionResolvers()
public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
null
is returned.resolveException
in interface HandlerExceptionResolver
request
- current HTTP requestresponse
- current HTTP responsehandler
- the executed handler, or null
if none chosen at the
time of the exception (for example, if multipart resolution failed)ex
- the exception that got thrown during handler executionnull
for default processing