mirror of https://github.com/apache/lucene.git
SOLR-5623: Use root locale in String.format and do not wrap SolrExceptions
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1564700 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7016e497fa
commit
9cb69be380
|
@ -57,6 +57,7 @@ import java.net.URL;
|
|||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Future;
|
||||
|
@ -157,9 +158,11 @@ public class DirectUpdateHandler2 extends UpdateHandler implements SolrCoreState
|
|||
public int addDoc(AddUpdateCommand cmd) throws IOException {
|
||||
try {
|
||||
return addDoc0(cmd);
|
||||
} catch (RuntimeException t) {
|
||||
|
||||
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, String.format("Exception writing document id %s to the index; possible analysis error.",
|
||||
} catch (SolrException e) {
|
||||
throw e;
|
||||
} catch (RuntimeException t) {
|
||||
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
|
||||
String.format(Locale.ROOT, "Exception writing document id %s to the index; possible analysis error.",
|
||||
cmd.getPrintableId()), t);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue