orpiske commented on code in PR #29525:
URL: https://github.com/apache/camel/pull/29525#discussion_r4523043573


##########
components/camel-bean/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java:
##########
@@ -158,7 +158,8 @@ private static void useCustomAdapter(Exchange exchange, 
AsyncCallback callback,
         }
         try {
             target.process(exchange);
-        } catch (AssertionError | Exception e) {
+        } catch (Throwable e) {

Review Comment:
   My biggest concern here is that this would catch 
[Error](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Error.html)
 and all its sub-classes, including errors that applications should not - 
generally - try to catch. 
   
   I think trying to catch those can lead to very unpredictable behavior and 
may mislead applications to try to handle problems even when the JVM itself may 
be inconsistent. 
   



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