EA-96041: Make error message more user-friendly

This commit is contained in:
Yan Zhulanow
2017-11-24 14:44:13 +09:00
committed by Yan Zhulanow
parent fa6285d32a
commit e5a2be4f3c
@@ -172,7 +172,11 @@ class KotlinCoreEnvironment private constructor(
JsSyntheticTranslateExtension.registerExtensionPoint(project)
for (registrar in configuration.getList(ComponentRegistrar.PLUGIN_COMPONENT_REGISTRARS)) {
registrar.registerProjectComponents(project, configuration)
try {
registrar.registerProjectComponents(project, configuration)
} catch (e: AbstractMethodError) {
throw IllegalStateException("The provided plugin ${registrar.javaClass.name} is not compatible with this version of compiler", e)
}
}
project.registerService(DeclarationProviderFactoryService::class.java, CliDeclarationProviderFactoryService(sourceFiles))