This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 6aefff42f34 (chores) camel-base-engine: stop catching Throwable in 
AbstractCamelContext
6aefff42f34 is described below

commit 6aefff42f34d07f77baa6eb49ad5181fd6d2e662
Author: Otavio Rodolfo Piske <angusyo...@gmail.com>
AuthorDate: Wed Mar 29 14:47:02 2023 +0200

    (chores) camel-base-engine: stop catching Throwable in AbstractCamelContext
---
 .../java/org/apache/camel/impl/engine/AbstractCamelContext.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index 99ec0c526e8..e1350d74c1a 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -2089,7 +2089,7 @@ public abstract class AbstractCamelContext extends 
BaseService
         for (LifecycleStrategy strategy : lifecycleStrategies) {
             try {
                 strategy.onContextStarted(this);
-            } catch (Throwable e) {
+            } catch (Exception e) {
                 LOG.warn("Lifecycle strategy {} failed on CamelContext ({}) 
due to: {}. This exception will be ignored",
                         strategy,
                         camelContextExtension.getName(),
@@ -2116,7 +2116,7 @@ public abstract class AbstractCamelContext extends 
BaseService
         for (LifecycleStrategy strategy : lifecycleStrategies) {
             try {
                 strategy.onContextStopping(this);
-            } catch (Throwable e) {
+            } catch (Exception e) {
                 LOG.warn("Lifecycle strategy {} failed on CamelContext ({}) 
due to: {}. This exception will be ignored",
                         strategy,
                         camelContextExtension.getName(),
@@ -2873,7 +2873,7 @@ public abstract class AbstractCamelContext extends 
BaseService
             if (shutdownStrategy != null) {
                 shutdownStrategy.shutdownForced(this, 
camelContextExtension.getRouteStartupOrder());
             }
-        } catch (Throwable e) {
+        } catch (Exception e) {
             LOG.warn("Error occurred while shutting down routes. This 
exception will be ignored.", e);
         }
 
@@ -2947,7 +2947,7 @@ public abstract class AbstractCamelContext extends 
BaseService
             for (LifecycleStrategy strategy : lifecycleStrategies) {
                 strategy.onContextStopped(this);
             }
-        } catch (Throwable e) {
+        } catch (Exception e) {
             LOG.warn("Error occurred while stopping lifecycle strategies. This 
exception will be ignored.", e);
         }
 

Reply via email to