You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2014/02/05 11:25:47 UTC
svn commit: r1564700 -
/lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java
Author: shalin
Date: Wed Feb 5 10:25:47 2014
New Revision: 1564700
URL: http://svn.apache.org/r1564700
Log:
SOLR-5623: Use root locale in String.format and do not wrap SolrExceptions
Modified:
lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java?rev=1564700&r1=1564699&r2=1564700&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java Wed Feb 5 10:25:47 2014
@@ -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 extend
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);
}
}