From 1ab183faebc5aab459e18444b381395942a4fdfe Mon Sep 17 00:00:00 2001 From: Felix Schindler <felix.schindler@wwu.de> Date: Tue, 9 Sep 2014 18:22:56 +0200 Subject: [PATCH] [common.configuration] added meaningful error message --- dune/stuff/common/configuration.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dune/stuff/common/configuration.hh b/dune/stuff/common/configuration.hh index 16457e464..4b4ba101e 100644 --- a/dune/stuff/common/configuration.hh +++ b/dune/stuff/common/configuration.hh @@ -247,7 +247,9 @@ public: { if (!has_key(key)) DUNE_THROW(Exceptions::configuration_error, - "Configuration does not have this key and there was no default value provided"); + "This configuration (see below) does not contain the key '" << key << "' and there was no default " + << "value provided!\n\n" + << report_string()); return get_valid_value<T, ValidateAny<T>>(key, T(), ValidateAny<T>(), size, cols); } // ... get(...) -- GitLab