[K/N] Fix wasm build

This commit is contained in:
Elena Lepilkina
2021-11-03 12:25:07 +03:00
committed by Space
parent f22de86954
commit 8ed4279759
@@ -46,11 +46,15 @@ void ThrowException(KRef exception) {
}
void HandleCurrentExceptionWhenLeavingKotlinCode() {
#if KONAN_NO_EXCEPTIONS
RuntimeCheck(false, "Exceptions unsupported");
#else
try {
std::rethrow_exception(std::current_exception());
} catch (ExceptionObjHolder& e) {
std::terminate(); // Terminate when it's a kotlin exception.
}
#endif
}
namespace {