From 4aea9f74e650743fe6585d5230dd6e5f6c94c478 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 26 Sep 2019 23:16:44 -0300 Subject: Rewritten StreamTexture for better code reuse, added basis universal support --- core/io/config_file.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/io') diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp index 74e85d0cc0..5968972143 100644 --- a/core/io/config_file.cpp +++ b/core/io/config_file.cpp @@ -86,9 +86,10 @@ void ConfigFile::set_value(const String &p_section, const String &p_key, const V Variant ConfigFile::get_value(const String &p_section, const String &p_key, Variant p_default) const { if (!values.has(p_section) || !values[p_section].has(p_key)) { - ERR_FAIL_COND_V_MSG(p_default.get_type() == Variant::NIL, p_default, "Couldn't find the given section/key and no default was given."); + ERR_FAIL_COND_V_MSG(p_default.get_type() == Variant::NIL, Variant(), "Couldn't find the given section '" + p_section + "', key '" + p_key + "' and no default was given."); return p_default; } + return values[p_section][p_key]; } -- cgit v1.2.3