summaryrefslogtreecommitdiff
path: root/core/src/main/java/org/elasticsearch/index/IndexNotFoundException.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/java/org/elasticsearch/index/IndexNotFoundException.java')
-rw-r--r--core/src/main/java/org/elasticsearch/index/IndexNotFoundException.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/src/main/java/org/elasticsearch/index/IndexNotFoundException.java b/core/src/main/java/org/elasticsearch/index/IndexNotFoundException.java
index bc7e55d5a0..035b90dd25 100644
--- a/core/src/main/java/org/elasticsearch/index/IndexNotFoundException.java
+++ b/core/src/main/java/org/elasticsearch/index/IndexNotFoundException.java
@@ -34,6 +34,15 @@ public final class IndexNotFoundException extends ResourceNotFoundException {
setIndex(index);
}
+ public IndexNotFoundException(Index index) {
+ this(index, null);
+ }
+
+ public IndexNotFoundException(Index index, Throwable cause) {
+ super("no such index", cause);
+ setIndex(index);
+ }
+
public IndexNotFoundException(StreamInput in) throws IOException {
super(in);
}