void (@NotNull Throwable t, @Nullable Logger log) { EssentialPluginMissingException essentialPluginMissingException = findCause(t, EssentialPluginMissingException.class); if (essentialPluginMissingException != null) { showMessage(BootstrapBundle.message("bootstrap.error.title.corrupted.installation"), BootstrapBundle.message("bootstrap.error.message.missing.essential.plugins.0.1.please.reinstall.2", essentialPluginMissingException.pluginIds.size(), essentialPluginMissingException.pluginIds.stream().sorted().collect( Collectors.joining("\n ", " ", "\n\n")), getProductNameSafe()), true); System.exit(AppExitCodes.INSTALLATION_CORRUPTED); } PluginException pluginException = findCause(t, PluginException.class); PluginId pluginId = pluginException == null ? null : pluginException.getPluginId(); if ((log != null || Logger.isInitialized()) && !(t instanceof ProcessCanceledException)) { try { (log == null ? PluginManagerCore.getLogger() : log).error(t); } catch (Throwable ignore) { } // workaround for SOE on parsing PAC file (JRE-247) if (t instanceof StackOverflowError && "Nashorn AST Serializer".equals(Thread.currentThread().getName())) { return; } } if (LoadingState.COMPONENTS_REGISTERED.isOccurred()) { ImplementationConflictException conflictException = findCause(t, ImplementationConflictException.class); if (conflictException != null) { PluginConflictReporter pluginConflictReporter = ApplicationManager.getApplication().getService(PluginConflictReporter.class); pluginConflictReporter.reportConflict(conflictException.getConflictingPluginIds(), conflictException.isConflictWithPlatform()); } } if (pluginId != null && !ApplicationInfoImpl.getShadowInstance().isEssentialPlugin(pluginId)) { PluginManagerCore.disablePlugin(pluginId); StringWriter message = new StringWriter(); message.append(BootstrapBundle.message("bootstrap.error.message.plugin.0.failed.to.initialize.and.will.be.disabled.please.restart.1", pluginId.getIdString(), getProductNameSafe())); message.append("\n\n"); Throwable cause = pluginException.getCause(); Objects.requireNonNullElse(cause, pluginException).printStackTrace(new PrintWriter(message)); showMessage(BootstrapBundle.message("bootstrap.error.title.plugin.error"), message.toString(), false); //NON-NLS System.exit(AppExitCodes.PLUGIN_ERROR); } else { showMessage(BootstrapBundle.message("bootstrap.error.title.start.failed"), t); System.exit(AppExitCodes.STARTUP_EXCEPTION); } }