提交 698b1e41 编写于 作者: lakernote's avatar lakernote

增强异步线程池情况下trace功能

上级 39576ffa
...@@ -94,20 +94,20 @@ public class EasyAdminThreadPoolExecutor extends ThreadPoolExecutor { ...@@ -94,20 +94,20 @@ public class EasyAdminThreadPoolExecutor extends ThreadPoolExecutor {
@Override @Override
protected void afterExecute(Runnable r, Throwable t) { protected void afterExecute(Runnable r, Throwable t) {
super.afterExecute(r, t); super.afterExecute(r, t);
// if (t == null && r instanceof Future) { if (t == null && r instanceof Future) {
// try { try {
//// Object result = ((Future<?>) r).get(); // Object result = ((Future<?>) r).get();
// ((Future<?>) r).get(); ((Future<?>) r).get();
// } catch (CancellationException ce) { } catch (CancellationException ce) {
// t = ce; t = ce;
// } catch (ExecutionException ee) { } catch (ExecutionException ee) {
// t = ee.getCause(); t = ee.getCause();
// } catch (InterruptedException ie) { } catch (InterruptedException ie) {
// Thread.currentThread().interrupt(); // ignore/reset Thread.currentThread().interrupt(); // ignore/reset
// } }
// } }
if (t != null) { if (t != null) {
log.error("", t); log.error("线程池中的任务执行异常!!!", t);
} }
log.debug("afterExecute-任务:{},异常:{}", r, t); log.debug("afterExecute-任务:{},异常:{}", r, t);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册