public class DefaultWebErrorProcessor extends AbstractResponseErrorProcessor implements IWebErrorProcessor, IWebInitialization
Constructor and Description |
---|
DefaultWebErrorProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
getErrorDefaultViewFormat() |
IWebMvc |
getOwner() |
void |
initialize(IWebMvc owner)
初始化
|
boolean |
isAnalysisDisabled() |
boolean |
isErrorWithStatusCode() |
boolean |
isInitialized()
是否已初始化
|
IView |
onConvention(IWebMvc owner,
IRequestContext requestContext)
自定义处理URL请求过程
|
void |
onError(IWebMvc owner,
Throwable e)
异常时将执行事件回调
|
IView |
onValidation(IWebMvc owner,
Map<String,ValidateResult> results)
处理验证结果数据
|
IView |
showErrorMsg(IWebMvc owner,
String code,
String msg,
Map<String,Object> dataMap) |
doProcessError, doProcessErrorStatusCodeIfNeed, exceptionAnalysis, getErrorDefaultViewFormat, isAnalysisDisabled, isErrorWithStatusCode, processError, setAnalysisDisabled, setErrorDefaultViewFormat, setErrorWithStatusCode, showValidationResults
public void initialize(IWebMvc owner) throws Exception
IInitialization
initialize
in interface IInitialization<IWebMvc>
owner
- 指定所属容器参数对象Exception
- 初始过程中产生的任何异常public boolean isInitialized()
IInitialization
isInitialized
in interface IInitialization<IWebMvc>
public void close() throws Exception
close
in interface AutoCloseable
Exception
public IView showErrorMsg(IWebMvc owner, String code, String msg, Map<String,Object> dataMap)
showErrorMsg
in class AbstractResponseErrorProcessor
public void onError(IWebMvc owner, Throwable e)
IWebErrorProcessor
onError
in interface IWebErrorProcessor
owner
- 所属YMP框架管理器实例e
- 异常对象public IView onValidation(IWebMvc owner, Map<String,ValidateResult> results)
IWebErrorProcessor
onValidation
in interface IWebErrorProcessor
owner
- 所属YMP框架管理器实例results
- 验证器执行结果集合public IView onConvention(IWebMvc owner, IRequestContext requestContext) throws Exception
IWebErrorProcessor
onConvention
in interface IWebErrorProcessor
owner
- 所属YMP框架管理器实例requestContext
- 请求上下文Exception
- 可能产生的异常public final IWebMvc getOwner()
public final String getErrorDefaultViewFormat()
public boolean isErrorWithStatusCode()
public final boolean isAnalysisDisabled()
Copyright © 2022. All rights reserved.