Handle CancellationExceptions in BlazeSyncManager
Also logs a "Sync Cancelled" line to the top level task.
Fixes
@@ -43,6 +43,7 @@ import com.intellij.openapi.project.DumbService;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.startup.StartupManager;
import java.util.Collection;
+import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.function.Predicate;
@@ -118,6 +119,9 @@ public class BlazeSyncManager {
} catch (ExecutionException e) {
context.output(new PrintOutput(e.getMessage(), OutputType.ERROR));
context.setHasError();
+ } catch (CancellationException e) {
+ context.output(new PrintOutput("Sync cancelled"));
+ context.setCancelled();
}
}
