log runtime exceptions

This commit is contained in:
Athou
2014-11-20 14:50:24 +01:00
parent 81481c37fe
commit e6050219bc

View File

@@ -37,7 +37,14 @@ public class FeedRefreshExecutor {
return offerLast(r);
}
}
});
}) {
@Override
protected void afterExecute(Runnable r, Throwable t) {
if (t != null) {
log.error("thread from pool {} threw a runtime exception", poolName, t);
}
};
};
pool.setRejectedExecutionHandler(new RejectedExecutionHandler() {
@Override
public void rejectedExecution(Runnable r, ThreadPoolExecutor e) {