类 AbstractActionMappingMethodExceptionHandler
java.lang.Object
cn.taketoday.core.OrderedSupport
cn.taketoday.web.handler.AbstractHandlerExceptionHandler
cn.taketoday.web.handler.AbstractActionMappingMethodExceptionHandler
- 所有已实现的接口:
cn.taketoday.core.Ordered,HandlerExceptionHandler
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
-
字段概要
从类继承的字段 cn.taketoday.web.handler.AbstractHandlerExceptionHandler
logger从类继承的字段 cn.taketoday.core.OrderedSupport
order从接口继承的字段 cn.taketoday.web.HandlerExceptionHandler
BEAN_NAME, NONE_RETURN_VALUE从接口继承的字段 cn.taketoday.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected abstract ObjecthandleInternal(RequestContext request, HandlerMethod handlerMethod, Throwable ex) Actually resolve the given exception that got thrown during on handler execution, returning a view(result) that represents a specific error page if appropriate.protected ObjecthandleInternal(RequestContext request, Object handler, Throwable ex) Actually handle the given exception that got thrown during handler execution, returning aresultthat represents a specific error page if appropriate.protected booleanWhether this handler has global exception handlers, e.g. not declared in the same class as theHandlerMethodthat raised the exception and therefore can apply to any handler.protected booleanshouldApplyTo(RequestContext request, Object handler) Checks if the handler is aHandlerMethodand then delegates to the base class implementation of#shouldApplyTo(HttpServletRequest, Object)passing the bean of theHandlerMethod.从类继承的方法 cn.taketoday.web.handler.AbstractHandlerExceptionHandler
addMappedHandlerClass, buildLogMessage, getMappedHandlerClasses, handleException, hasHandlerMappings, logException, logResultedInException, prepareResponse, preventCaching, setMappedHandlerClasses, setMappedHandlers, setPreventResponseCaching, setWarnLogCategory从类继承的方法 cn.taketoday.core.OrderedSupport
getOrder, setOrder
-
构造器详细资料
-
AbstractActionMappingMethodExceptionHandler
public AbstractActionMappingMethodExceptionHandler()
-
-
方法详细资料
-
shouldApplyTo
Checks if the handler is aHandlerMethodand then delegates to the base class implementation of#shouldApplyTo(HttpServletRequest, Object)passing the bean of theHandlerMethod. Otherwise returnsfalse.- 覆盖:
shouldApplyTo在类中AbstractHandlerExceptionHandler- 参数:
request- current HTTP request contexthandler- the executed handler, ornullif 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 theHandlerMethodthat raised the exception and therefore can apply to any handler. -
handleInternal
@Nullable protected Object handleInternal(RequestContext request, @Nullable Object handler, Throwable ex) throws Exception 从类复制的说明:AbstractHandlerExceptionHandlerActually handle the given exception that got thrown during handler execution, returning aresultthat 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 contexthandler- the executed handler, ornullif 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 viewto forward to, ornullfor 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 requesthandlerMethod- the executed handler method, ornullif 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
nullfor default processing - 抛出:
Exception
-