Debugger tests: catch exceptions correctly
This commit is contained in:
@@ -120,9 +120,18 @@ abstract class KotlinDebuggerTestBase : KotlinDebuggerTestCase() {
|
|||||||
|
|
||||||
public fun doOnBreakpoint(action: SuspendContextImpl.() -> Unit) {
|
public fun doOnBreakpoint(action: SuspendContextImpl.() -> Unit) {
|
||||||
super.onBreakpoint(SuspendContextRunnable {
|
super.onBreakpoint(SuspendContextRunnable {
|
||||||
initContexts(it)
|
try {
|
||||||
it.printContext()
|
initContexts(it)
|
||||||
it.action()
|
it.printContext()
|
||||||
|
it.action()
|
||||||
|
}
|
||||||
|
catch(e: AssertionError) {
|
||||||
|
throw e
|
||||||
|
}
|
||||||
|
catch(e: Throwable) {
|
||||||
|
e.printStackTrace()
|
||||||
|
resume(it)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user