Skip to content

Commit 88415b3

Browse files
committed
refactor(apollo-common): 优化异常处理信息展示
1 parent 7bf6e7f commit 88415b3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Apollo 2.5.0
99
* [Feature: Provide a new configfiles API to return the raw content of configuration files directly](https://github.com/apolloconfig/apollo/pull/5336)
1010
* [Feature: Enhanced instance configuration auditing and caching](https://github.com/apolloconfig/apollo/pull/5361)
1111
* [Feature: Provide a new open API to return the organization list](https://github.com/apolloconfig/apollo/pull/5365)
12+
* [Refactor: Exception hander adds root cause information](https://github.com/apolloconfig/apollo/pull/5367)
1213

1314
------------------
1415
All issues and pull requests are [here](https://github.com/apolloconfig/apollo/milestone/16?closed=1)

Diff for: apollo-common/src/main/java/com/ctrip/framework/apollo/common/controller/GlobalDefaultExceptionHandler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ private String getMessageWithRootCause(Throwable ex) {
175175
String message = ex.getMessage();
176176
Throwable rootCause = NestedExceptionUtils.getMostSpecificCause(ex);
177177
if (rootCause != ex) {
178-
message += "; rootCause message " + rootCause.getMessage();
178+
message += " [Cause: " + rootCause.getMessage() + "]";
179179
}
180180
return message;
181181
}

0 commit comments

Comments
 (0)