[K/N] Fix wasm build
This commit is contained in:
@@ -46,11 +46,15 @@ void ThrowException(KRef exception) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void HandleCurrentExceptionWhenLeavingKotlinCode() {
|
void HandleCurrentExceptionWhenLeavingKotlinCode() {
|
||||||
|
#if KONAN_NO_EXCEPTIONS
|
||||||
|
RuntimeCheck(false, "Exceptions unsupported");
|
||||||
|
#else
|
||||||
try {
|
try {
|
||||||
std::rethrow_exception(std::current_exception());
|
std::rethrow_exception(std::current_exception());
|
||||||
} catch (ExceptionObjHolder& e) {
|
} catch (ExceptionObjHolder& e) {
|
||||||
std::terminate(); // Terminate when it's a kotlin exception.
|
std::terminate(); // Terminate when it's a kotlin exception.
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|||||||
Reference in New Issue
Block a user