1818import git4idea .update .GitFetchResult ;
1919import git4idea .update .GitFetcher ;
2020import git4idea .util .GitCommitCompareInfo ;
21- import lombok .SneakyThrows ;
2221import org .jetbrains .annotations .NotNull ;
2322import org .jetbrains .annotations .Nullable ;
2423import org .jetbrains .ide .PooledThreadExecutor ;
@@ -85,9 +84,9 @@ public DiffInfo getDiffInfo(@NotNull final BranchInfo from, @NotNull final Branc
8584 } catch (InterruptedException e ) {
8685 throw new IOException (e );
8786 } catch (ExecutionException e ) {
88- Throwable ex = e .getCause ();
89- if (ex instanceof VcsException ) {
90- throw new IOException (ex );
87+ Throwable wrapEx = e .getCause ();
88+ if (wrapEx . getCause () instanceof VcsException ) {
89+ throw new IOException (wrapEx . getCause () );
9190 }
9291 return null ;
9392 }
@@ -99,7 +98,13 @@ public CompletableFuture<DiffInfo> launchLoadDiffInfo(@NotNull final BranchInfo
9998 }
10099
101100 CompletableFuture <Boolean > fetchFuture = launchFetchRemote (branch );
102- return fetchFuture .thenApply (t -> doLoadDiffInfo (from , branch ));
101+ return fetchFuture .thenApply (t -> {
102+ try {
103+ return doLoadDiffInfo (from , branch );
104+ } catch (VcsException e ) {
105+ throw new RuntimeException (e );
106+ }
107+ });
103108 }
104109
105110 private CompletableFuture <Boolean > launchFetchRemote (@ NotNull final BranchInfo branch ) {
@@ -125,8 +130,7 @@ private boolean doFetchRemote(@NotNull BranchInfo branch) {
125130 }
126131
127132 @ NotNull
128- @ SneakyThrows (VcsException .class )
129- private DiffInfo doLoadDiffInfo (@ NotNull final BranchInfo from , @ NotNull final BranchInfo to ) {
133+ private DiffInfo doLoadDiffInfo (@ NotNull final BranchInfo from , @ NotNull final BranchInfo to ) throws VcsException {
130134 String currentBranch = from .getFullName ();
131135 String targetBranch = to .getFullRemoteName ();
132136
0 commit comments