diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-10-05 15:57:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-05 15:57:55 +0200 |
commit | 3ae1d2d899d1cb2a5e746cbac279a175b22e58f0 (patch) | |
tree | c03930d56a332438cda271c2047872e35e5bc012 /core | |
parent | d9af98e114201aba61e8e237a8d0bdea4029cf71 (diff) | |
parent | 29dc8de88bdba441b64197712d52c43bbdf6ee1c (diff) |
Merge pull request #53431 from MaxLap/new_instance_error_message
Diffstat (limited to 'core')
-rw-r--r-- | core/object/class_db.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/object/class_db.cpp b/core/object/class_db.cpp index 8ba46e49eb..d5509c50f1 100644 --- a/core/object/class_db.cpp +++ b/core/object/class_db.cpp @@ -529,7 +529,7 @@ Object *ClassDB::instantiate(const StringName &p_class) { } ERR_FAIL_COND_V_MSG(!ti, nullptr, "Cannot get class '" + String(p_class) + "'."); ERR_FAIL_COND_V_MSG(ti->disabled, nullptr, "Class '" + String(p_class) + "' is disabled."); - ERR_FAIL_COND_V(!ti->creation_func, nullptr); + ERR_FAIL_COND_V_MSG(!ti->creation_func, nullptr, "Class '" + String(p_class) + "' or its base class cannot be instantiated."); } #ifdef TOOLS_ENABLED if (ti->api == API_EDITOR && !Engine::get_singleton()->is_editor_hint()) { |