diff --git a/src/main/java/org/elasticsearch/common/util/concurrent/EsAbortPolicy.java b/src/main/java/org/elasticsearch/common/util/concurrent/EsAbortPolicy.java index 3e2ea780783..9b25ffdf50e 100644 --- a/src/main/java/org/elasticsearch/common/util/concurrent/EsAbortPolicy.java +++ b/src/main/java/org/elasticsearch/common/util/concurrent/EsAbortPolicy.java @@ -30,6 +30,6 @@ public class EsAbortPolicy implements RejectedExecutionHandler { @Override public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { - throw new EsRejectedExecutionException(); + throw new EsRejectedExecutionException("rejected execution of [" + r.getClass().getName() + "]"); } } diff --git a/src/main/java/org/elasticsearch/common/util/concurrent/EsRejectedExecutionException.java b/src/main/java/org/elasticsearch/common/util/concurrent/EsRejectedExecutionException.java index e9c7c452791..050c9fecd56 100644 --- a/src/main/java/org/elasticsearch/common/util/concurrent/EsRejectedExecutionException.java +++ b/src/main/java/org/elasticsearch/common/util/concurrent/EsRejectedExecutionException.java @@ -26,6 +26,10 @@ import org.elasticsearch.rest.RestStatus; */ public class EsRejectedExecutionException extends ElasticSearchException { + public EsRejectedExecutionException(String message) { + super(message); + } + public EsRejectedExecutionException() { super(null); }