接口 HandlerExceptionResolver
- 所有已知实现类:
AbstractHandlerExceptionResolver
,AnnotationMethodHandlerExceptionResolver
,SimpleMappingExceptionResolver
public interface HandlerExceptionResolver
Interface to be implemented by objects than can resolve exceptions thrown during handler mapping or execution, in the typical case to error views. Implementors are typically registered as beans in the application context.Error views are analogous to the error page JSPs, but can be used with any kind of exception including any checked exception, with potentially fine-granular mappings for specific handlers.
- 从以下版本开始:
- 2.0
- 作者:
- Juergen Hoeller, John A. Lewis
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 ModelAndView
resolveException(RenderRequest request, RenderResponse response, Object handler, Exception ex)
Try to resolve the given exception that got thrown during on handler execution, returning a ModelAndView that represents a specific error page if appropriate.ModelAndView
resolveException(ResourceRequest request, ResourceResponse response, Object handler, Exception ex)
Try to resolve the given exception that got thrown during on handler execution, returning a ModelAndView that represents a specific error page if appropriate.
方法详细资料
resolveException
ModelAndView resolveException(RenderRequest request, RenderResponse response, Object handler, Exception ex)
Try to resolve the given exception that got thrown during on handler execution, returning a ModelAndView that represents a specific error page if appropriate.- 参数:
request
- current portlet requestresponse
- current portlet 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 execution- 返回:
- a corresponding ModelAndView to forward to, or
null
for default processing
resolveException
ModelAndView resolveException(ResourceRequest request, ResourceResponse response, Object handler, Exception ex)
Try to resolve the given exception that got thrown during on handler execution, returning a ModelAndView that represents a specific error page if appropriate.- 参数:
request
- current portlet requestresponse
- current portlet 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 execution- 返回:
- a corresponding ModelAndView to forward to, or
null
for default processing