Apache Lucene open-source search software
SOLR-14280: SolrConfig error handling improvements
Jason Gerlowski46ca76868752
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex a5cf874dd56..0e09e496f97 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -261,6 +261,8 @@ Other Changes* SOLR-14495: Fix or suppress warnings in solr/search/function (Erick Erickson)+* SOLR-14280: Improve error reporting in SolrConfig (Andras Salamon via Jason Gerlowski)+================== 8.5.1 ==================Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.diff --git a/solr/core/src/java/org/apache/solr/core/SolrConfig.java b/solr/core/src/java/org/apache/solr/core/SolrConfig.javaindex 04142603db7..68179ef2ee0 100644--- a/solr/core/src/java/org/apache/solr/core/SolrConfig.java+++ b/solr/core/src/java/org/apache/solr/core/SolrConfig.java@@ -755,7 +755,7 @@ public class SolrConfig extends XmlConfigFile implements MapSerializable {try {urls.addAll(SolrResourceLoader.getURLs(libPath));} catch (IOException e) {- log.warn("Couldn't add files from {} to classpath: {}", libPath, e.getMessage());+ log.warn("Couldn't add files from {} to classpath: {}", libPath, e);}}@@ -781,14 +781,14 @@ public class SolrConfig extends XmlConfigFile implements MapSerializable {elseurls.addAll(SolrResourceLoader.getFilteredURLs(dir, regex));} catch (IOException e) {- log.warn("Couldn't add files from {} filtered by {} to classpath: {}", dir, regex, e.getMessage());+ log.warn("Couldn't add files from {} filtered by {} to classpath: {}", dir, regex, e);}} else if (null != path) {final Path dir = instancePath.resolve(path);try {urls.add(dir.toUri().toURL());} catch (MalformedURLException e) {- log.warn("Couldn't add file {} to classpath: {}", dir, e.getMessage());+ log.warn("Couldn't add file {} to classpath: {}", dir, e);}} else {throw new RuntimeException("lib: missing mandatory attributes: 'dir' or 'path'");