kennknowles commented on code in PR #37748:
URL: https://github.com/apache/beam/pull/37748#discussion_r2884781301


##########
runners/core-java/src/main/java/org/apache/beam/runners/core/SimpleDoFnRunner.java:
##########
@@ -215,8 +217,10 @@ private void invokeProcessElement(WindowedValue<InputT> 
elem) {
     // This can contain user code. Wrap it in case it throws an exception.
     try {
       invoker.invokeProcessElement(new DoFnProcessContext(elem));
-    } catch (Exception ex) {
-      throw wrapUserCodeException(ex);
+    } catch (OutOfMemoryError oom) {
+      throw oom;
+    } catch (Throwable t) {
+      throw wrapUserCodeException(t);

Review Comment:
   I agree with your conclusion and your code change here.
   
   "An Error is a subclass of Throwable that indicates serious problems that a 
reasonable application should not try to catch. Most such errors are abnormal 
conditions."
   
   I am fine with changing behavior of broken code for the better :-)



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