ad more info when rejecting execution

This commit is contained in:
Shay Banon 2012-07-08 12:06:57 +02:00
parent b27cc1318f
commit d3e9506a1d
2 changed files with 5 additions and 1 deletions

View File

@ -30,6 +30,6 @@ public class EsAbortPolicy implements RejectedExecutionHandler {
@Override @Override
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
throw new EsRejectedExecutionException(); throw new EsRejectedExecutionException("rejected execution of [" + r.getClass().getName() + "]");
} }
} }

View File

@ -26,6 +26,10 @@ import org.elasticsearch.rest.RestStatus;
*/ */
public class EsRejectedExecutionException extends ElasticSearchException { public class EsRejectedExecutionException extends ElasticSearchException {
public EsRejectedExecutionException(String message) {
super(message);
}
public EsRejectedExecutionException() { public EsRejectedExecutionException() {
super(null); super(null);
} }