mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
log runtime exceptions
This commit is contained in:
@@ -37,7 +37,14 @@ public class FeedRefreshExecutor {
|
|||||||
return offerLast(r);
|
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() {
|
pool.setRejectedExecutionHandler(new RejectedExecutionHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void rejectedExecution(Runnable r, ThreadPoolExecutor e) {
|
public void rejectedExecution(Runnable r, ThreadPoolExecutor e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user