From 71d71d55b5c0d6da4d1555823ac432bf0b33389a Mon Sep 17 00:00:00 2001 From: Braden Bodily Date: Wed, 14 Aug 2019 20:57:49 -0600 Subject: Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/' Condensed some if and ERR statements. Added dots to end of error messages Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?), core/os/memory.cpp, drivers/png/png_driver_common.cpp, drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?) --- core/resource.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'core/resource.cpp') diff --git a/core/resource.cpp b/core/resource.cpp index 74e2c1ed6b..5a5efa4644 100644 --- a/core/resource.cpp +++ b/core/resource.cpp @@ -75,8 +75,7 @@ void Resource::set_path(const String &p_path, bool p_take_over) { bool exists = ResourceCache::resources.has(p_path); ResourceCache::lock->read_unlock(); - ERR_EXPLAIN("Another resource is loaded from path: " + p_path + " (possible cyclic resource inclusion)"); - ERR_FAIL_COND(exists); + ERR_FAIL_COND_MSG(exists, "Another resource is loaded from path: " + p_path + " (possible cyclic resource inclusion)."); } } path_cache = p_path; @@ -277,8 +276,7 @@ void Resource::notify_change_to_owners() { for (Set::Element *E = owners.front(); E; E = E->next()) { Object *obj = ObjectDB::get_instance(E->get()); - ERR_EXPLAIN("Object was deleted, while still owning a resource"); - ERR_CONTINUE(!obj); //wtf + ERR_CONTINUE_MSG(!obj, "Object was deleted, while still owning a resource."); //wtf //TODO store string obj->call("resource_changed", RES(this)); } @@ -427,7 +425,7 @@ Resource::~Resource() { ResourceCache::lock->write_unlock(); } if (owners.size()) { - WARN_PRINT("Resource is still owned"); + WARN_PRINT("Resource is still owned."); } } -- cgit v1.2.3