From 0d6487073f037bee74506e600d0a861e2ba5f6a7 Mon Sep 17 00:00:00 2001 From: Shea Frembling Date: Tue, 20 Dec 2022 22:12:33 -0600 Subject: [PATCH] update error from Object::set_meta to be more human readable update error from Object::set_meta to be more human readable Add metadata to error message Add metadata to identifier --- core/object/object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/object/object.cpp b/core/object/object.cpp index cfac36127c0..f3b196088eb 100644 --- a/core/object/object.cpp +++ b/core/object/object.cpp @@ -892,7 +892,7 @@ void Object::set_meta(const StringName &p_name, const Variant &p_value) { if (E) { E->value = p_value; } else { - ERR_FAIL_COND(!p_name.operator String().is_valid_identifier()); + ERR_FAIL_COND_MSG(!p_name.operator String().is_valid_identifier(), "Invalid metadata identifier: '" + p_name + "'."); Variant *V = &metadata.insert(p_name, p_value)->value; metadata_properties["metadata/" + p_name.operator String()] = V; notify_property_list_changed();