Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32189809
D15233.1765091121.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
764 B
Referenced Files
None
Subscribers
None
D15233.1765091121.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D15233: [native] Fix JNI exception messages on Android
Attached
Detach File
Event Timeline
Log In to Comment