Debugger tests: catch exceptions correctly

This commit is contained in:
Natalia Ukhorskaya
2015-10-02 13:51:36 +03:00
parent 4f1af224d1
commit e2411f8e46
@@ -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)
}
})
}