felipepessoto commented on code in PR #13697: URL: https://github.com/apache/gluten/pull/13697#discussion_r4806130724
########## docs/developers/NewToGluten.md: ########## @@ -134,8 +134,9 @@ exception is left untouched; failure to throw the fallback is logged. A backend can register a `JniExceptionMetadataRegistration` to describe its own native errors to Java. The boundary asks the registered providers only when no Java exception is pending or carried. Providers must not call JNI; they return -the backend's name for the function that failed, the error's reason and its -diagnostic as owned strings. The function name can differ from the name of the +the backend's name for the function that failed, the error's reason, its +diagnostic and, if it has one, its Spark error condition (such as +`DIVIDE_BY_ZERO`) as owned strings. The function name can differ from the name of the Review Comment: Agreed, this section is too dense for an introductory guide. We can shorten it to explain the two main flows: preserving Java exceptions across native calls and translating native errors into Spark exceptions, with a small example of each. The ownership, locking, and failure-handling details would fit better in a dedicated JNI developer reference. -- 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]
