emkornfield commented on a change in pull request #10201:
URL: https://github.com/apache/arrow/pull/10201#discussion_r635789662
##########
File path: cpp/src/jni/dataset/jni_util.cc
##########
@@ -162,31 +192,40 @@ std::shared_ptr<ReservationListener>
ReservationListenableMemoryPool::get_listen
ReservationListenableMemoryPool::~ReservationListenableMemoryPool() {}
+Status CheckException(JNIEnv* env) {
+ if (env->ExceptionCheck()) {
+ env->ExceptionDescribe();
+ env->ExceptionClear();
+ return Status::Invalid("Error during calling Java code from native code");
Review comment:
including the message with Invalid could aid users. Status's have a
member for [arbitrary
details](https://github.com/apache/arrow/blob/8e43f23dcc6a9e630516228f110c48b64d13cec6/cpp/src/arrow/status.h#L101).
it might pay to create a new extension of this class that can keep a
reference to the exception?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]