blob: 322e917e19ad6e5e2b887881a12125b7cab1d16d [file]
// WITH_STDLIB
// TARGET_BACKEND: WASM
// USE_OLD_EXCEPTION_HANDLING_PROPOSAL
// WASM_FAILS_IN: Wasmtime, WasmEdge
import kotlin.test.*
fun box(): String {
assertFailsWith<IllegalStateException>("My error") {
try {
error("My error")
} catch (e: Throwable) {
throw e
}
}
return "OK"
}