From 20d0b4f446a17e3ccbe417e2b455942168fa7287 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Thu, 2 Jul 2015 22:40:54 +0200 Subject: Promote headers to first class citizens on exceptions This commit merges the pre-existing special exception that allowed to associate headers with exceptions and the elasticsaerch base class `ElasticsearchException` This allows for more generic use of exceptions where plugins can associate meta-data with any elasticsearch base exception to control behavior etc. This also addds a generic SecurityException to allow plugins to pass on information based on the RestStatus. --- core/src/test/java/org/elasticsearch/ElasticsearchExceptionTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/src/test/java/org/elasticsearch/ElasticsearchExceptionTests.java') diff --git a/core/src/test/java/org/elasticsearch/ElasticsearchExceptionTests.java b/core/src/test/java/org/elasticsearch/ElasticsearchExceptionTests.java index 699c3ca616..34bc1178b0 100644 --- a/core/src/test/java/org/elasticsearch/ElasticsearchExceptionTests.java +++ b/core/src/test/java/org/elasticsearch/ElasticsearchExceptionTests.java @@ -265,7 +265,7 @@ public class ElasticsearchExceptionTests extends ElasticsearchTestCase { new IllegalArgumentException("alalaal"), new NullPointerException("boom"), new EOFException("dadada"), - new SecurityException("nono!"), + new ElasticsearchSecurityException("nono!"), new NumberFormatException("not a number"), new CorruptIndexException("baaaam", "this is my resource"), new IndexFormatTooNewException("tooo new", 1, 1, 1), -- cgit v1.2.3