@@ -138,9 +138,10 @@ private Runnable wrapFuture(Runnable command) {
138
138
139
139
try {
140
140
runnableWrapper .wrap (command ).run ();
141
- } catch (Exception e ) {
142
- logger .error ("Error in async executor" , e );
143
- throw new CompletionException (e );
141
+ } catch (Throwable t ) {
142
+ runnableWrapper .wrap (() ->
143
+ logger .error ("Error in async executor" , t )).run ();
144
+ throw new CompletionException (t );
144
145
}
145
146
};
146
147
}
@@ -153,9 +154,10 @@ private <T> Supplier<T> wrapFuture(Supplier<T> command) {
153
154
154
155
try {
155
156
return command .get ();
156
- } catch (Exception e ) {
157
- logger .error ("Error in async executor" , e );
158
- throw new CompletionException (e );
157
+ } catch (Throwable t ) {
158
+ runnableWrapper .wrap (() ->
159
+ logger .error ("Error in async executor" , t )).run ();
160
+ throw new CompletionException (t );
159
161
}
160
162
};
161
163
}
@@ -168,7 +170,8 @@ private void runCommand(Runnable command) {
168
170
try {
169
171
runnableWrapper .wrap (command ).run ();
170
172
} catch (Throwable t ) {
171
- logger .error ("Error in executor" , t );
173
+ runnableWrapper .wrap (() ->
174
+ logger .error ("Error in async executor" , t )).run ();
172
175
}
173
176
}
174
177
0 commit comments