From 301ac675d6de891bae2344f89547ffabac24026e Mon Sep 17 00:00:00 2001 From: tashoyan Date: Thu, 23 Apr 2020 16:22:19 +0200 Subject: [PATCH] CASSANDRA-15754: Provide the root cause exception. Remove the misleading message 'Invalid yaml', as the root cause may be different. --- .../org/apache/cassandra/config/YamlConfigurationLoader.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java b/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java index 8398e8207e..9bdbd381a2 100644 --- a/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java +++ b/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java @@ -163,7 +163,8 @@ public class YamlConfigurationLoader implements ConfigurationLoader } catch (YAMLException e) { - throw new ConfigurationException("Invalid yaml: " + url, e); + String msg = "Failed to load configuration from " + url; + throw new ConfigurationException(msg, e); } }