diff options
Diffstat (limited to 'scene/main/node.cpp')
-rw-r--r-- | scene/main/node.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp index f6905e7c2e..e30f58e012 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2082,9 +2082,7 @@ void Node::_duplicate_and_reown(Node *p_new_parent, const Map<Node *, Node *> &p } else { Object *obj = ClassDB::instance(get_class()); - if (!obj) { - print_line("could not duplicate: " + String(get_class())); - } + ERR_EXPLAIN("Node: Could not duplicate: " + String(get_class())); ERR_FAIL_COND(!obj); node = Object::cast_to<Node>(obj); if (!node) @@ -2179,9 +2177,7 @@ Node *Node::duplicate_and_reown(const Map<Node *, Node *> &p_reown_map) const { Node *node = NULL; Object *obj = ClassDB::instance(get_class()); - if (!obj) { - print_line("could not duplicate: " + String(get_class())); - } + ERR_EXPLAIN("Node: Could not duplicate: " + String(get_class())); ERR_FAIL_COND_V(!obj, NULL); node = Object::cast_to<Node>(obj); if (!node) @@ -2472,7 +2468,7 @@ static void _Node_debug_sn(Object *p_obj) { path = n->get_name(); else path = String(p->get_name()) + "/" + p->get_path_to(n); - print_line(itos(p_obj->get_instance_id()) + "- Stray Node: " + path + " (Type: " + n->get_class() + ")"); + print_line(itos(p_obj->get_instance_id()) + " - Stray Node: " + path + " (Type: " + n->get_class() + ")"); } void Node::_print_stray_nodes() { |