felipepessoto commented on code in PR #13822:
URL: https://github.com/apache/gluten/pull/13822#discussion_r4773889657


##########
cpp/core/jni/JniError.h:
##########
@@ -53,6 +55,41 @@ class JniExceptionUnwrapperRegistration final {
   ExceptionUnwrapper unwrap_;
 };
 
+// What a backend knows about one of its native errors. JNI_METHOD_END raises 
it as an
+// org.apache.gluten.exception.GlutenNativeException, and Java code uses these 
fields to choose the
+// exception users see, for example a Spark exception for a failed cast. 
Backends don't name Java classes.
+// The strings should be UTF-8; their bytes, including NULs, reach Java 
unchanged. They are owned, so the
+// JNI boundary uses no backend memory.

Review Comment:
   Done in d8c88e96b. The struct comment now traces the path: `JNI_METHOD_END` 
calls `handleJniException`, which throws a `GlutenNativeException` whose 
`getFunctionName()`, `getReason()` and `getMessage()` return these fields. I 
also shortened the PR description.
   
   <sub>Auto-replied by the [GitHub Copilot app](https://gh.io/app)</sub>



-- 
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