public static void processException(@NotNull Throwable t) {
    if (LoadingState.COMPONENTS_LOADED.isOccurred() && !(t instanceof StartupAbortedException)) {
      if (!(t instanceof ControlFlowException)) {
        PluginManagerCore.getLogger().error(t);
      }
      return;
    }

    var essentialPluginMissingException = findCause(t, EssentialPluginMissingException.class);
    if (essentialPluginMissingException != null) {
      var pluginIds = essentialPluginMissingException.pluginIds;
      showError(
        BootstrapBundle.message("bootstrap.error.title.corrupted"),
        BootstrapBundle.message("bootstrap.error.essential.plugins", pluginIds.size(), "  " + String.join("\n  ", pluginIds) + "\n\n"));
      System.exit(AppExitCodes.INSTALLATION_CORRUPTED);
    }

    var pluginException = findCause(t, PluginException.class);
    var pluginId = pluginException == null ? null : pluginException.getPluginId();

    if (Logger.isInitialized() && !(t instanceof ProcessCanceledException)) {
      try {
        PluginManagerCore.getLogger().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()) {
      var 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);

      var message = new StringWriter();
      message.append(BootstrapBundle.message("bootstrap.error.message.plugin.failed", pluginId.getIdString()));
      message.append("\n\n");
      requireNonNullElse(pluginException.getCause(), pluginException).printStackTrace(new PrintWriter(message));

      showError(BootstrapBundle.message("bootstrap.error.title.plugin.init"), message.toString()); //NON-NLS
      System.exit(AppExitCodes.PLUGIN_ERROR);
    }
    else {
      showError(BootstrapBundle.message("bootstrap.error.title.start.failed"), t);
      System.exit(AppExitCodes.STARTUP_EXCEPTION);
    }
  }
public static void processException(@NotNull Throwable t)