diff --git a/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java b/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java index 1416ebf638e7ae90467fcb28e94cc76983e2c112..53968fa59e8cb1fa6d3a98d099da2be1c4289136 100644 --- a/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java +++ b/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java @@ -296,7 +296,7 @@ public class BrokerController { public void run() { try { BrokerController.this.protectBroker(); - } catch (Exception e) { + } catch (Throwable e) { log.error("protectBroker error.", e); } } @@ -307,7 +307,7 @@ public class BrokerController { public void run() { try { BrokerController.this.printWaterMark(); - } catch (Exception e) { + } catch (Throwable e) { log.error("printWaterMark error.", e); } } diff --git a/broker/src/main/java/org/apache/rocketmq/broker/client/ClientHousekeepingService.java b/broker/src/main/java/org/apache/rocketmq/broker/client/ClientHousekeepingService.java index 559dac1d832991bc86f046555da4f8646521a9cf..c61531c201dc259a53c5967e248caea84110e912 100644 --- a/broker/src/main/java/org/apache/rocketmq/broker/client/ClientHousekeepingService.java +++ b/broker/src/main/java/org/apache/rocketmq/broker/client/ClientHousekeepingService.java @@ -45,8 +45,8 @@ public class ClientHousekeepingService implements ChannelEventListener { public void run() { try { ClientHousekeepingService.this.scanExceptionChannel(); - } catch (Exception e) { - log.error("", e); + } catch (Throwable e) { + log.error("Error occurred when scan not active client channels.", e); } } }, 1000 * 10, 1000 * 10, TimeUnit.MILLISECONDS); diff --git a/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java b/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java index 1c3da9adca2d9cdf250267603afc9d52bbd9bcb7..db6a7e4bab4e78882b37c6590d074996a29b0b05 100644 --- a/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java +++ b/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java @@ -166,7 +166,7 @@ public class NettyRemotingClient extends NettyRemotingAbstract implements Remoti public void run() { try { NettyRemotingClient.this.scanResponseTable(); - } catch (Exception e) { + } catch (Throwable e) { log.error("scanResponseTable exception", e); } } diff --git a/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingServer.java b/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingServer.java index a9a55abae0b366c9df31ba0c2e77863fc7834049..b2041b2ac21dcbd67fae8cd7ec1e1e48517a6468 100644 --- a/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingServer.java +++ b/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingServer.java @@ -195,7 +195,7 @@ public class NettyRemotingServer extends NettyRemotingAbstract implements Remoti public void run() { try { NettyRemotingServer.this.scanResponseTable(); - } catch (Exception e) { + } catch (Throwable e) { log.error("scanResponseTable exception", e); } } diff --git a/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java b/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java index 4549f1ea32bcad84bd39b618e933f06e695e3182..b5bac3f721f62512093b953fa9d5db43658f558f 100644 --- a/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java +++ b/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java @@ -1443,7 +1443,7 @@ public class DefaultMessageStore implements MessageStore { this.deleteExpiredFiles(); this.redeleteHangedFile(); - } catch (Exception e) { + } catch (Throwable e) { DefaultMessageStore.log.warn(this.getServiceName() + " service has exception. ", e); } } @@ -1583,7 +1583,7 @@ public class DefaultMessageStore implements MessageStore { public void run() { try { this.deleteExpiredFiles(); - } catch (Exception e) { + } catch (Throwable e) { DefaultMessageStore.log.warn(this.getServiceName() + " service has exception. ", e); } } diff --git a/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java b/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java index 172954deea140365fa968cebe264558e4261afd1..012a4f0550a980ed38d448ba968749c5d2600888 100644 --- a/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java +++ b/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java @@ -121,7 +121,7 @@ public class ScheduleMessageService extends ConfigManager { public void run() { try { ScheduleMessageService.this.persist(); - } catch (Exception e) { + } catch (Throwable e) { log.error("scheduleAtFixedRate flush exception", e); } }