diff --git a/platform/platform-impl/src/com/intellij/ide/plugins/PluginManager.java b/platform/platform-impl/src/com/intellij/ide/plugins/PluginManager.java index 469a0ccd11ef..46bda9cc49fe 100644 --- a/platform/platform-impl/src/com/intellij/ide/plugins/PluginManager.java +++ b/platform/platform-impl/src/com/intellij/ide/plugins/PluginManager.java @@ -99,13 +99,10 @@ public class PluginManager extends PluginManagerCore { } public static void processException(Throwable t) { - @SuppressWarnings("ThrowableResultOfMethodCallIgnored") StartupAbortedException se = findCause(t); + if (!IdeaApplication.isLoaded()) { + @SuppressWarnings("ThrowableResultOfMethodCallIgnored") StartupAbortedException se = findCause(t); + if (se == null) se = new StartupAbortedException(t); - if (se == null && !IdeaApplication.isLoaded()) { - se = new StartupAbortedException(t); - } - - if (se != null) { if (se.logError()) { try { if (Logger.isInitialized() && !(t instanceof ProcessCanceledException)) { @@ -119,8 +116,7 @@ public class PluginManager extends PluginManagerCore { System.exit(se.exitCode()); } - - if (!(t instanceof ProcessCanceledException)) { + else if (!(t instanceof ProcessCanceledException)) { getLogger().error(t); } }