SOLR-3338: ignore exceptions from getConfigDir(), it's used only for clearer logs

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1310800 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stanisław Osiński 2012-04-07 16:50:49 +00:00
parent 44e4290b4c
commit 55454dd616
1 changed files with 10 additions and 3 deletions

View File

@ -186,9 +186,16 @@ public class CarrotClusteringEngine extends SearchClusteringEngine {
@Override
public String toString() {
return "SolrResourceLocator, "
+ "configDir=" + new File(resourceLoader.getConfigDir()).getAbsolutePath()
+ ", Carrot2 relative lexicalResourcesDir=";
String configDir = "";
try {
configDir = "configDir=" + new File(resourceLoader.getConfigDir()).getAbsolutePath() + ", ";
} catch (Exception ignored) {
// If we get the exception, the resource loader implementation
// probably does not support getConfigDir(). Not a big problem.
}
return "SolrResourceLocator, " + configDir
+ "Carrot2 relative lexicalResourcesDir=" + carrot2ResourcesDir;
}
}