From e1e1428f4b0af6eff83db74ca4bff7604441b18f Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Mon, 7 Oct 2013 01:44:29 +0400 Subject: [PATCH] Exception handling fixed for the case of inner classes --- src/org/jetbrains/eval4j/interpreterLoop.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/jetbrains/eval4j/interpreterLoop.kt b/src/org/jetbrains/eval4j/interpreterLoop.kt index e0656f436ef..b75a0b1002a 100644 --- a/src/org/jetbrains/eval4j/interpreterLoop.kt +++ b/src/org/jetbrains/eval4j/interpreterLoop.kt @@ -70,9 +70,9 @@ fun interpreterLoop( fun exceptionCaught(exceptionValue: Value): Boolean { val catchBlocks = handlers[m.instructions.indexOf(currentInsn)] ?: listOf() for (catch in catchBlocks) { - val exceptionTypeDesc = catch.`type` - if (exceptionTypeDesc != null) { - val exceptionType = Type.getType(exceptionTypeDesc) + val exceptionTypeInternalName = catch.`type` + if (exceptionTypeInternalName != null) { + val exceptionType = Type.getObjectType(exceptionTypeInternalName) if (eval.isInstanceOf(exceptionValue, exceptionType)) { frame.clearStack() frame.push(exceptionValue)