类 AbstractActionMappingMethodExceptionHandler

java.lang.Object
cn.taketoday.core.OrderedSupport
cn.taketoday.web.handler.AbstractHandlerExceptionHandler
cn.taketoday.web.handler.AbstractActionMappingMethodExceptionHandler
所有已实现的接口:
cn.taketoday.core.Ordered, HandlerExceptionHandler
直接已知子类:
ExceptionHandlerAnnotationExceptionHandler, SimpleActionMappingMethodExceptionHandler

public abstract class AbstractActionMappingMethodExceptionHandler extends AbstractHandlerExceptionHandler
Abstract base class for HandlerExceptionHandler implementations that support handling exceptions from handlers of type ActionMappingAnnotationHandler.
从以下版本开始:
4.0 2022/3/2 21:53
作者:
Rossen Stoyanchev, Harry Yang
  • 构造器详细资料

    • AbstractActionMappingMethodExceptionHandler

      public AbstractActionMappingMethodExceptionHandler()
  • 方法详细资料

    • shouldApplyTo

      protected boolean shouldApplyTo(RequestContext request, @Nullable Object handler)
      Checks if the handler is a HandlerMethod and then delegates to the base class implementation of #shouldApplyTo(HttpServletRequest, Object) passing the bean of the HandlerMethod. Otherwise returns false.
      覆盖:
      shouldApplyTo 在类中 AbstractHandlerExceptionHandler
      参数:
      request - current HTTP request context
      handler - the executed handler, or null if none chosen at the time of the exception (for example, if multipart resolution failed)
      返回:
      whether this resolved should proceed with resolving the exception for the given request and handler
      另请参阅:
    • hasGlobalExceptionHandlers

      protected boolean hasGlobalExceptionHandlers()
      Whether this handler has global exception handlers, e.g. not declared in the same class as the HandlerMethod that raised the exception and therefore can apply to any handler.
    • handleInternal

      @Nullable protected Object handleInternal(RequestContext request, @Nullable Object handler, Throwable ex) throws Exception
      从类复制的说明: AbstractHandlerExceptionHandler
      Actually handle the given exception that got thrown during handler execution, returning a result that represents a specific error page if appropriate.

      May be overridden in subclasses, in order to apply specific exception checks. Note that this template method will be invoked after checking whether this resolved applies ("mappedHandlers" etc), so an implementation may simply proceed with its actual exception handling.

      指定者:
      handleInternal 在类中 AbstractHandlerExceptionHandler
      参数:
      request - current HTTP request context
      handler - the executed handler, or null if none chosen at the time of the exception (for example, if lookup handler failed)
      ex - the exception that got thrown during handler execution
      返回:
      a corresponding Object view to forward to, or null for default processing in the resolution chain
      抛出:
      Exception
    • handleInternal

      @Nullable protected abstract Object handleInternal(RequestContext request, @Nullable HandlerMethod handlerMethod, Throwable ex) throws Exception
      Actually resolve the given exception that got thrown during on handler execution, returning a view(result) that represents a specific error page if appropriate.

      May be overridden in subclasses, in order to apply specific exception checks. Note that this template method will be invoked after checking whether this resolved applies ("mappedHandlers" etc), so an implementation may simply proceed with its actual exception handling.

      参数:
      request - current HTTP request
      handlerMethod - the executed handler method, 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
      抛出:
      Exception