Skip to content

Commit

Permalink
[ROCKETMQ-238] Catch Throwable to avoid error cancel some key schedul…
Browse files Browse the repository at this point in the history
…ed tasks.
  • Loading branch information
zhouxinyu committed Jul 5, 2017
1 parent b70b680 commit 9ad9ad0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ public void run() {
public void run() {
try {
BrokerController.this.protectBroker();
} catch (Exception e) {
} catch (Throwable e) {
log.error("protectBroker error.", e);
}
}
Expand All @@ -307,7 +307,7 @@ public void run() {
public void run() {
try {
BrokerController.this.printWaterMark();
} catch (Exception e) {
} catch (Throwable e) {
log.error("printWaterMark error.", e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public void start() {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public void initChannel(SocketChannel ch) throws Exception {
public void run() {
try {
NettyRemotingClient.this.scanResponseTable();
} catch (Exception e) {
} catch (Throwable e) {
log.error("scanResponseTable exception", e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public void initChannel(SocketChannel ch) throws Exception {
public void run() {
try {
NettyRemotingServer.this.scanResponseTable();
} catch (Exception e) {
} catch (Throwable e) {
log.error("scanResponseTable exception", e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,7 @@ public void run() {
this.deleteExpiredFiles();

this.redeleteHangedFile();
} catch (Exception e) {
} catch (Throwable e) {
DefaultMessageStore.log.warn(this.getServiceName() + " service has exception. ", e);
}
}
Expand Down Expand Up @@ -1583,7 +1583,7 @@ class CleanConsumeQueueService {
public void run() {
try {
this.deleteExpiredFiles();
} catch (Exception e) {
} catch (Throwable e) {
DefaultMessageStore.log.warn(this.getServiceName() + " service has exception. ", e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void start() {
public void run() {
try {
ScheduleMessageService.this.persist();
} catch (Exception e) {
} catch (Throwable e) {
log.error("scheduleAtFixedRate flush exception", e);
}
}
Expand Down

0 comments on commit 9ad9ad0

Please sign in to comment.