use of com.intellij.diagnostic.ImplementationConflictException in project intellij-community by JetBrains.
the class PluginManager method processException.
public static void processException(Throwable t) {
if (!IdeaApplication.isLoaded()) {
@SuppressWarnings("ThrowableResultOfMethodCallIgnored") StartupAbortedException se = findCause(t, StartupAbortedException.class);
if (se == null)
se = new StartupAbortedException(t);
@SuppressWarnings("ThrowableResultOfMethodCallIgnored") PluginException pe = findCause(t, PluginException.class);
PluginId pluginId = pe != null ? pe.getPluginId() : null;
if (Logger.isInitialized() && !(t instanceof ProcessCanceledException)) {
try {
getLogger().error(t);
} catch (Throwable ignore) {
}
}
final ImplementationConflictException conflictException = findCause(t, ImplementationConflictException.class);
if (conflictException != null) {
PluginConflictReporter.INSTANCE.reportConflictByClasses(conflictException.getConflictingClasses());
}
if (pluginId != null && !CORE_PLUGIN_ID.equals(pluginId.getIdString())) {
disablePlugin(pluginId.getIdString());
StringWriter message = new StringWriter();
message.append("Plugin '").append(pluginId.getIdString()).append("' failed to initialize and will be disabled. ");
message.append(" Please restart ").append(ApplicationNamesInfo.getInstance().getFullProductName()).append('.');
message.append("\n\n");
pe.getCause().printStackTrace(new PrintWriter(message));
Main.showMessage("Plugin Error", message.toString(), false);
System.exit(Main.PLUGIN_ERROR);
} else {
Main.showMessage("Start Failed", t);
System.exit(se.exitCode());
}
} else if (!(t instanceof ProcessCanceledException)) {
getLogger().error(t);
}
}
Aggregations