Generalize error processing in retrieving gradle settings, fixes #EA-87096, #EA-87129, #EA-87275 and alike
This commit is contained in:
+1
-5
@@ -38,15 +38,11 @@ class GradleScriptTemplatesProvider(project: Project): ScriptTemplatesProvider {
|
|||||||
com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.toCanonicalPath(project.basePath!!),
|
com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.toCanonicalPath(project.basePath!!),
|
||||||
org.jetbrains.plugins.gradle.util.GradleConstants.SYSTEM_ID)
|
org.jetbrains.plugins.gradle.util.GradleConstants.SYSTEM_ID)
|
||||||
}
|
}
|
||||||
catch (e: NoClassDefFoundError) {
|
catch (e: Throwable) {
|
||||||
// TODO: consider displaying the warning to the user
|
// TODO: consider displaying the warning to the user
|
||||||
Logger.getInstance(GradleScriptTemplatesProvider::class.java).warn("[kts] Cannot get gradle execution settings", e)
|
Logger.getInstance(GradleScriptTemplatesProvider::class.java).warn("[kts] Cannot get gradle execution settings", e)
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
catch (e: ClassNotFoundException) {
|
|
||||||
Logger.getInstance(GradleScriptTemplatesProvider::class.java).warn("[kts] Cannot get gradle execution settings", e)
|
|
||||||
null // see todo above
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private val gradleJvmOptions: List<String> by lazy {
|
private val gradleJvmOptions: List<String> by lazy {
|
||||||
|
|||||||
Reference in New Issue
Block a user