Skip to content

Commit

Permalink
Merge pull request apache#42 from nobodyiam/exception-with-cause
Browse files Browse the repository at this point in the history
add cause to FrameworkException to expose the actual exception
  • Loading branch information
slievrly authored Jan 15, 2019
2 parents f4ec5d4 + 86978c7 commit 9ee15f7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ protected Channel getNewChannel(InetSocketAddress address) {
try {
f.await(this.nettyClientConfig.getConnectTimeoutMillis(), TimeUnit.MILLISECONDS);
if (f.isCancelled()) {
throw new FrameworkException("connect cancelled, can not connect to fescar-server.");
throw new FrameworkException(f.cause(), "connect cancelled, can not connect to fescar-server.");
} else if (!f.isSuccess()) {
throw new FrameworkException("connect failed, can not connect to fescar-server.");
throw new FrameworkException(f.cause(), "connect failed, can not connect to fescar-server.");
} else {
channel = f.channel();
}
Expand Down

0 comments on commit 9ee15f7

Please sign in to comment.