You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2013/03/13 13:28:39 UTC
svn commit: r1455904 -
/lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java
Author: markrmiller
Date: Wed Mar 13 12:28:39 2013
New Revision: 1455904
URL: http://svn.apache.org/r1455904
Log:
change runtime exception to service unavailable solrexception
Modified:
lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java?rev=1455904&r1=1455903&r2=1455904&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java Wed Mar 13 12:28:39 2013
@@ -25,6 +25,7 @@ import org.apache.lucene.index.IndexWrit
import org.apache.lucene.store.AlreadyClosedException;
import org.apache.solr.cloud.RecoveryStrategy;
import org.apache.solr.common.SolrException;
+import org.apache.solr.common.SolrException.ErrorCode;
import org.apache.solr.core.CoreContainer;
import org.apache.solr.core.CoreDescriptor;
import org.apache.solr.core.DirectoryFactory;
@@ -81,7 +82,7 @@ public final class DefaultSolrCoreState
throws IOException {
if (closed) {
- throw new RuntimeException("SolrCoreState already closed");
+ throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE, "SolrCoreState already closed");
}
synchronized (writerPauseLock) {
@@ -98,7 +99,7 @@ public final class DefaultSolrCoreState
} catch (InterruptedException e) {}
if (closed) {
- throw new RuntimeException("Already closed");
+ throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE, "Already closed");
}
}
@@ -147,7 +148,7 @@ public final class DefaultSolrCoreState
} catch (InterruptedException e) {}
if (closed) {
- throw new RuntimeException("SolrCoreState already closed");
+ throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE, "SolrCoreState already closed");
}
}