[git] handle PCE separately

This commit is contained in:
Kirill Likhodedov
2015-01-13 15:46:57 +03:00
parent 5c21da5fbc
commit 461d3dce7c
@@ -20,6 +20,7 @@ import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.SystemInfo;
@@ -480,6 +481,9 @@ public abstract class GitHandler {
myProcess = startProcess();
startHandlingStreams();
}
catch (ProcessCanceledException pce) {
cleanupEnv();
}
catch (Throwable t) {
if (!ApplicationManager.getApplication().isUnitTestMode() || !myProject.isDisposed()) {
LOG.error(t); // will surely happen if called during unit test disposal, because the working dir is simply removed then