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
This commit is contained in:
Shea Frembling 2022-12-20 22:12:33 -06:00 committed by Shea Frembling
parent 2a04b18d37
commit 0d6487073f

View file

@ -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();