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

ericpai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new a354fd4c35 [IOTDB-3979] Let WrappedCallable/WrappedRunnable catch 
Throwable (#6803)
a354fd4c35 is described below

commit a354fd4c355d54730f4a25af58b7ca1f846ef08c
Author: Jamber <[email protected]>
AuthorDate: Thu Jul 28 09:24:29 2022 +0800

    [IOTDB-3979] Let WrappedCallable/WrappedRunnable catch Throwable (#6803)
    
    Co-authored-by: haiyi.zb <[email protected]>
---
 .../java/org/apache/iotdb/commons/concurrent/WrappedCallable.java     | 4 ++--
 .../java/org/apache/iotdb/commons/concurrent/WrappedRunnable.java     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/node-commons/src/main/java/org/apache/iotdb/commons/concurrent/WrappedCallable.java
 
b/node-commons/src/main/java/org/apache/iotdb/commons/concurrent/WrappedCallable.java
index ae42a0dc4f..b4328316fb 100644
--- 
a/node-commons/src/main/java/org/apache/iotdb/commons/concurrent/WrappedCallable.java
+++ 
b/node-commons/src/main/java/org/apache/iotdb/commons/concurrent/WrappedCallable.java
@@ -29,12 +29,12 @@ public abstract class WrappedCallable<V> implements 
Callable<V> {
   public final V call() {
     try {
       return callMayThrow();
-    } catch (Exception e) {
+    } catch (Throwable e) {
       throw ScheduledExecutorUtil.propagate(e);
     }
   }
 
-  public abstract V callMayThrow() throws Exception;
+  public abstract V callMayThrow() throws Throwable;
 
   public static <V> Callable<V> wrap(Callable<V> callable) {
     if (callable instanceof WrappedCallable) {
diff --git 
a/node-commons/src/main/java/org/apache/iotdb/commons/concurrent/WrappedRunnable.java
 
b/node-commons/src/main/java/org/apache/iotdb/commons/concurrent/WrappedRunnable.java
index a91278639d..9d15889c40 100644
--- 
a/node-commons/src/main/java/org/apache/iotdb/commons/concurrent/WrappedRunnable.java
+++ 
b/node-commons/src/main/java/org/apache/iotdb/commons/concurrent/WrappedRunnable.java
@@ -27,12 +27,12 @@ public abstract class WrappedRunnable implements Runnable {
   public final void run() {
     try {
       runMayThrow();
-    } catch (Exception e) {
+    } catch (Throwable e) {
       throw ScheduledExecutorUtil.propagate(e);
     }
   }
 
-  public abstract void runMayThrow() throws Exception;
+  public abstract void runMayThrow() throws Throwable;
 
   public static Runnable wrap(Runnable runnable) {
     if (runnable instanceof WrappedRunnable) {

Reply via email to