Page MenuHomePhorge

D15233.1765091121.diff
No OneTemporary

Size
764 B
Referenced Files
None
Subscribers
None

D15233.1765091121.diff

diff --git a/native/android/app/src/cpp/jniHelpers.h b/native/android/app/src/cpp/jniHelpers.h
--- a/native/android/app/src/cpp/jniHelpers.h
+++ b/native/android/app/src/cpp/jniHelpers.h
@@ -34,7 +34,14 @@
// require access to native Java API we need to temporarily attach the
// thread to JVM This function attaches thread to JVM for the time lambda
// passed to this function will be executing.
- jni::ThreadScope::WithClassLoader(std::move(task));
+ auto wrappedTask = [task = std::move(task)]() {
+ try {
+ task();
+ } catch (jni::JniException &e) {
+ throw std::runtime_error(std::string{"Java exception: "} + e.what());
+ }
+ };
+ jni::ThreadScope::WithClassLoader(std::move(wrappedTask));
}
};

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 7, 7:05 AM (13 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5842980
Default Alt Text
D15233.1765091121.diff (764 B)

Event Timeline