Skip to content

Commit b88fdc4

Browse files
committed
Catch Exception to ensure we catch'em'all
1 parent bb6f970 commit b88fdc4

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • server/src/main/java/org/elasticsearch/index/analysis

server/src/main/java/org/elasticsearch/index/analysis/Analysis.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
import org.apache.lucene.analysis.th.ThaiAnalyzer;
4949
import org.apache.lucene.analysis.tr.TurkishAnalyzer;
5050
import org.apache.lucene.analysis.util.CSVUtil;
51-
import org.elasticsearch.ElasticsearchException;
5251
import org.elasticsearch.ResourceNotFoundException;
5352
import org.elasticsearch.action.support.PlainActionFuture;
5453
import org.elasticsearch.common.Strings;
@@ -367,15 +366,15 @@ public static Reader getReaderFromIndex(
367366

368367
try {
369368
results = synonymsLoadingFuture.actionGet();
370-
} catch (ElasticsearchException e) {
369+
} catch (Exception e) {
371370
if (ignoreMissing == false) {
372371
throw e;
373372
}
374373

375374
boolean notFound = e instanceof ResourceNotFoundException;
376375
String message = String.format(
377376
Locale.ROOT,
378-
"Synonyms set %s %s." + " synonyms will not be applied to search results on indices that use this synonym set",
377+
"Synonyms set %s %s. Synonyms will not be applied to search results on indices that use this synonym set",
379378
synonymsSet,
380379
notFound ? "not found" : "could not be loaded"
381380
);

0 commit comments

Comments
 (0)