From e2411f8e468c47305d47cf0623c0faf65c6553f9 Mon Sep 17 00:00:00 2001 From: Natalia Ukhorskaya Date: Fri, 2 Oct 2015 13:51:36 +0300 Subject: [PATCH] Debugger tests: catch exceptions correctly --- .../idea/debugger/KotlinDebuggerTestBase.kt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerTestBase.kt b/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerTestBase.kt index dd938e4eb81..6abbf302b3a 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerTestBase.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerTestBase.kt @@ -120,9 +120,18 @@ abstract class KotlinDebuggerTestBase : KotlinDebuggerTestCase() { public fun doOnBreakpoint(action: SuspendContextImpl.() -> Unit) { super.onBreakpoint(SuspendContextRunnable { - initContexts(it) - it.printContext() - it.action() + try { + initContexts(it) + it.printContext() + it.action() + } + catch(e: AssertionError) { + throw e + } + catch(e: Throwable) { + e.printStackTrace() + resume(it) + } }) }