summaryrefslogtreecommitdiff
path: root/core/io/xml_parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/io/xml_parser.cpp')
-rw-r--r--core/io/xml_parser.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/io/xml_parser.cpp b/core/io/xml_parser.cpp
index 82527d3f38..9487947365 100644
--- a/core/io/xml_parser.cpp
+++ b/core/io/xml_parser.cpp
@@ -443,10 +443,8 @@ String XMLParser::get_attribute_value(const String &p_name) const {
}
}
- if (idx < 0) {
- ERR_EXPLAIN("Attribute not found: " + p_name);
- }
- ERR_FAIL_COND_V(idx < 0, "");
+ ERR_FAIL_COND_V_MSG(idx < 0, "", "Attribute not found: " + p_name + ".");
+
return attributes[idx].value;
}