From 1c07c42b2ca0a4bb71bd2dda8578c4b06f26a5f9 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Sun, 13 Oct 2013 16:01:55 +0400 Subject: [PATCH] better toString() --- src/org/jetbrains/eval4j/interpreterLoop.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/org/jetbrains/eval4j/interpreterLoop.kt b/src/org/jetbrains/eval4j/interpreterLoop.kt index 6b11505da2a..d9dcfc1eaa1 100644 --- a/src/org/jetbrains/eval4j/interpreterLoop.kt +++ b/src/org/jetbrains/eval4j/interpreterLoop.kt @@ -45,7 +45,9 @@ trait InterpretationEventHandler { fun exceptionCaught(currentState: Frame, currentInsn: AbstractInsnNode, exception: Value): InterpreterResult? } -class ThrownFromEvalException(val exception: Value): RuntimeException() +class ThrownFromEvalException(val exception: Value): RuntimeException() { + fun toString(): String = "Thrown by evaluator: $exception" +} fun interpreterLoop( m: MethodNode,