more clear "cannot find extension implementation" exception

GitOrigin-RevId: c58606809f775673e08688b355581e22d967982c
This commit is contained in:
Vladimir Krivosheev
2021-03-10 19:15:16 +00:00
committed by intellij-monorepo-bot
parent 1eb69fff90
commit 57cbf83433
@@ -1,4 +1,4 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.extensions.impl;
import com.intellij.diagnostic.ActivityCategory;
@@ -1054,11 +1054,16 @@ public abstract class ExtensionPointImpl<@NotNull T> implements ExtensionPoint<T
}
if (isRequired) {
@NonNls String message = "could not find extension implementation " + aClass;
if (isInReadOnlyMode()) {
message += " (point in read-only mode)";
@NonNls String message = "cannot find extension implementation " + aClass + "(epName=" + getName() + ", extensionCount=" + size();
List<? extends T> cache = myExtensionsCache;
if (cache != null) {
message += ", cachedExtensions";
}
throw new IllegalArgumentException(message);
if (isInReadOnlyMode()) {
message += ", point in read-only mode";
}
message += ")";
throw componentManager.createError(message, getPluginDescriptor().getPluginId());
}
return null;
}