public class ErrorUtil extends Object
| Constructor and Description |
|---|
ErrorUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getErrorMsg(Throwable e)
根据异常从配置信息中获取异常信息
|
static String |
getErrorMsg(Throwable e,
String defaultMsg)
根据异常从配置信息中获取异常信息
|
void |
init(WebExceptionProperties exceptionProperties)
初始化数据
|
public static String getErrorMsg(Throwable e, String defaultMsg)
根据异常从配置信息中获取异常信息
提取过程如下e - 异常信息defaultMsg - 自定义提示信息public static String getErrorMsg(Throwable e)
根据异常从配置信息中获取异常信息
提取过程如下e - 异常信息public void init(WebExceptionProperties exceptionProperties)
exceptionProperties - 全局异常捕获属性配置Copyright © 2021. All rights reserved.