Commit 8155ca81d7200bfee98d5ab9c174af1b7307d585
1 parent
ac28a0aa
【3.2.0 版本发布】 升级springboot2.6.6、spring-cloud-alibaba 2021.1、代码规范调整、微服务测试例子
Showing
1 changed file
with
4 additions
and
0 deletions
jeecg-boot/jeecg-boot-base/jeecg-boot-base-tools/src/main/java/org/jeecg/common/enums/SentinelErrorInfoEnum.java
... | ... | @@ -93,6 +93,10 @@ public enum SentinelErrorInfoEnum { |
93 | 93 | * @return String 错误信息 |
94 | 94 | */ |
95 | 95 | public static SentinelErrorInfoEnum getErrorByException(Throwable throwable) { |
96 | + if(throwable==null){ | |
97 | + return null; | |
98 | + } | |
99 | + | |
96 | 100 | String exceptionClass=throwable.getClass().getSimpleName(); |
97 | 101 | for (SentinelErrorInfoEnum e : SentinelErrorInfoEnum.values()) { |
98 | 102 | if (exceptionClass.equals(e.name())) { |
... | ... |