diff --git a/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressIndicatorUtils.java b/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressIndicatorUtils.java index 9d995ddb3812..c7e19085c946 100644 --- a/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressIndicatorUtils.java +++ b/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressIndicatorUtils.java @@ -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); } } }