ProcessCanceledException is not an error for future that is canceled by indicator cancellation

GitOrigin-RevId: dfa84b5ce4b3226e417c2b84939fd8bd1c0e6dac
This commit is contained in:
Alexey Utkin
2020-01-22 10:38:13 +00:00
committed by intellij-monorepo-bot
parent e18661f747
commit 3a215fb792
@@ -320,12 +320,14 @@ public class ProgressIndicatorUtils {
}
catch (Throwable e) {
Throwable cause = e.getCause();
if (cause instanceof CancellationException) {
throw new ProcessCanceledException(cause);
} else {
ExceptionUtil.rethrowUnchecked(e);
throw new RuntimeException(e);
if (cause instanceof ProcessCanceledException) {
throw (ProcessCanceledException)cause;
}
if (cause instanceof CancellationException) {
throw new ProcessCanceledException(cause);
}
ExceptionUtil.rethrowUnchecked(e);
throw new RuntimeException(e);
}
}
}