Skip to content

Commit 9062b8c

Browse files
committed
runtime: throw to java if terminating worker throws exception
1 parent fdfde26 commit 9062b8c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test-app/runtime/src/main/cpp/runtime/callbackhandlers/CallbackHandlers.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,15 +1852,15 @@ void CallbackHandlers::TerminateWorkerThread(napi_env env) {
18521852
try {
18531853
Runtime::GetRuntime(env)->DestroyRuntime();
18541854
} catch (NativeScriptException &e) {
1855-
e.ReThrowToNapi(env);
1855+
e.ReThrowToJava(nullptr);
18561856
} catch (std::exception e) {
18571857
std::stringstream ss;
18581858
ss << "Error: c++ exception: " << e.what() << std::endl;
18591859
NativeScriptException nsEx(ss.str());
1860-
nsEx.ReThrowToNapi(env);
1860+
nsEx.ReThrowToJava(nullptr);
18611861
} catch (...) {
18621862
NativeScriptException nsEx(std::string("Error: c++ exception!"));
1863-
nsEx.ReThrowToNapi(env);
1863+
nsEx.ReThrowToJava(nullptr);
18641864
}
18651865

18661866
}

0 commit comments

Comments
 (0)