[kotlin][debugger] EA-404968 propagate IndexNotReadyException, thrown at the beginning of evaluation, outside of RA

Debugger performs dumb check at the beginning of evaluation, and throws an exception if index is not ready yet, so that an IDE could show an error in the evaluation window. But runReadAction suppressed the exception, which made evaluation in dumb mode proceed and fail further in InlineFunctionAnalyzer.

GitOrigin-RevId: 7ddd0212d135736488f7625a113310bf573b2655
This commit is contained in:
Alexander Kuznetsov
2023-08-24 21:49:31 +00:00
committed by intellij-monorepo-bot
parent 1d479f26a0
commit 36289bbb65
@@ -106,7 +106,7 @@ class KotlinEvaluator(val codeFragment: KtCodeFragment, private val sourcePositi
return context.debugProcess.virtualMachineProxy.mirrorOfVoid()
}
runReadAction {
ReadAction.run<Throwable> {
if (DumbService.getInstance(codeFragment.project).isDumb) {
evaluationException(KotlinDebuggerEvaluationBundle.message("error.dumb.mode"))
}