|
20 | 20 | package org.elasticsearch.action.termvectors;
|
21 | 21 |
|
22 | 22 | import org.apache.logging.log4j.message.ParameterizedMessage;
|
23 |
| -import org.elasticsearch.ElasticsearchException; |
24 | 23 | import org.elasticsearch.action.support.ActionFilters;
|
25 | 24 | import org.elasticsearch.action.support.TransportActions;
|
26 | 25 | import org.elasticsearch.action.support.single.shard.TransportSingleShardAction;
|
@@ -84,13 +83,13 @@ protected MultiTermVectorsShardResponse shardOperation(MultiTermVectorsShardRequ
|
84 | 83 | try {
|
85 | 84 | TermVectorsResponse termVectorsResponse = TermVectorsService.getTermVectors(indexShard, termVectorsRequest);
|
86 | 85 | response.add(request.locations.get(i), termVectorsResponse);
|
87 |
| - } catch (Exception t) { |
88 |
| - if (TransportActions.isShardNotAvailableException(t)) { |
89 |
| - throw (ElasticsearchException) t; |
| 86 | + } catch (RuntimeException e) { |
| 87 | + if (TransportActions.isShardNotAvailableException(e)) { |
| 88 | + throw e; |
90 | 89 | } else {
|
91 |
| - logger.debug(() -> new ParameterizedMessage("{} failed to execute multi term vectors for [{}]/[{}]", shardId, termVectorsRequest.type(), termVectorsRequest.id()), t); |
| 90 | + logger.debug(() -> new ParameterizedMessage("{} failed to execute multi term vectors for [{}]/[{}]", shardId, termVectorsRequest.type(), termVectorsRequest.id()), e); |
92 | 91 | response.add(request.locations.get(i),
|
93 |
| - new MultiTermVectorsResponse.Failure(request.index(), termVectorsRequest.type(), termVectorsRequest.id(), t)); |
| 92 | + new MultiTermVectorsResponse.Failure(request.index(), termVectorsRequest.type(), termVectorsRequest.id(), e)); |
94 | 93 | }
|
95 | 94 | }
|
96 | 95 | }
|
|
0 commit comments