BrytonLee commented on code in PR #1980:
URL: https://github.com/apache/auron/pull/1980#discussion_r2757005818


##########
native-engine/auron/src/lib.rs:
##########
@@ -55,8 +55,15 @@ fn handle_unwinded(err: Box<dyn Any + Send>) {
 }
 
 fn handle_unwinded_scope<T: Default, E: Debug>(scope: impl FnOnce() -> 
Result<T, E>) -> T {
-    match std::panic::catch_unwind(AssertUnwindSafe(|| scope().expect("scope 
failed"))) {
-        Ok(v) => v,
+    match std::panic::catch_unwind(AssertUnwindSafe(|| scope())) {
+        Ok(Ok(v)) => v,
+        Ok(Err(err)) => {
+            // Defensive handling: this path should not be reached in normal 
operation
+            // after the SendError fixes (is_finalizing flag, FFI_ArrowArray 
lifetime).
+            // If triggered, it indicates a new issue that needs investigation.
+            log::warn!("error in unwinded scope: {err:?}");

Review Comment:
   Thanks for your feedback. Applied.



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

Reply via email to