Merge pull request #70386 from sfrembling/70141
Add Human Readable Error Message for Object::set_meta
This commit is contained in:
commit
97a6b40e4e
1 changed files with 1 additions and 1 deletions
|
@ -903,7 +903,7 @@ void Object::set_meta(const StringName &p_name, const Variant &p_value) {
|
||||||
if (E) {
|
if (E) {
|
||||||
E->value = p_value;
|
E->value = p_value;
|
||||||
} else {
|
} 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;
|
Variant *V = &metadata.insert(p_name, p_value)->value;
|
||||||
|
|
||||||
const String &sname = p_name;
|
const String &sname = p_name;
|
||||||
|
|
Loading…
Reference in a new issue