rui-mo commented on code in PR #13822:
URL: https://github.com/apache/gluten/pull/13822#discussion_r4745618645


##########
cpp/core/jni/JniError.h:
##########
@@ -53,6 +55,38 @@ class JniExceptionUnwrapperRegistration final {
   ExceptionUnwrapper unwrap_;
 };
 
+// A Java throwable to raise for a native error. className uses JNI's 
slash-separated form and is resolved by
+// FindClass with the class loader of the class declaring the native method. 
The class must extend
+// java.lang.Throwable and have a (byte[] reason, byte[] diagnostic) 
constructor. The reason and diagnostic
+// should be UTF-8; their bytes, including NULs, are passed unchanged. The 
strings are owned, so the JNI
+// boundary uses no backend memory.
+struct JniExceptionMetadata {
+  std::string className;

Review Comment:
   Could we delegate the responsibility of throwing the appropriate throwable 
to Java rather than hard-coding the Java class in native code?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to