Don't fail in case of exception in terminal customizer (IDEA-162282)
authorDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Mon, 10 Oct 2016 17:26:43 +0000 (19:26 +0200)
committerDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Mon, 10 Oct 2016 17:30:22 +0000 (19:30 +0200)
plugins/terminal/src/org/jetbrains/plugins/terminal/LocalTerminalDirectRunner.java

index a4c6f5846b1e8da41ed92029469a55c7d8fb0d23..b9dc3207f3ede5c8b8d8d5a58891270aa8654b4e 100644 (file)
@@ -105,10 +105,15 @@ public class LocalTerminalDirectRunner extends AbstractTerminalRunner<PtyProcess
     String[] command = getCommand();
 
     for (LocalTerminalCustomizer customizer : LocalTerminalCustomizer.EP_NAME.getExtensions()) {
-      command = customizer.customizeCommandAndEnvironment(myProject, command, envs);
+      try {
+        command = customizer.customizeCommandAndEnvironment(myProject, command, envs);
 
-      if (directory == null) {
-        directory = customizer.getDefaultFolder();
+        if (directory == null) {
+          directory = customizer.getDefaultFolder();
+        }
+      }
+      catch (Exception e) {
+        LOG.error("Exception during customization of the terminal session", e);
       }
     }