SOLR-268 - Tweaks to post.jar so it prints the error message from Solr.

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@550010 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2007-06-23 05:33:06 +00:00
parent 7b4db83305
commit 9eb7ff4bc5
2 changed files with 6 additions and 2 deletions

View File

@ -92,7 +92,9 @@ Other Changes
to be removed in a later release. While this change does not affect API
compatibility, it is recommended to update references to these
deprecated classes. (ryan)
2. SOLR-268: Tweaks to post.jar so it prints the error message from Solr.
(Brian Whitman via hossman)
================== Release 1.2, 20070602 ==================

View File

@ -264,8 +264,10 @@ public class SimplePostTool {
}
} catch (IOException e) {
try {
fatal("Solr returned an error: " + urlc.getResponseMessage());
} catch (IOException f) { }
fatal("Connection error (is Solr running at " + solrUrl + " ?): " + e);
} finally {
if(urlc!=null) urlc.disconnect();
}