summaryrefslogtreecommitdiff
path: root/core/resource.cpp
diff options
context:
space:
mode:
authorNils ANDRÉ-CHANG <nils@nilsand.re>2019-09-12 21:28:49 +0100
committerNils ANDRÉ-CHANG <nils@nilsand.re>2019-09-26 20:36:12 +0100
commit0024dd7bb5a8a5194ed0283fc506edcd8b4a7737 (patch)
tree86316cccbf4fda58a275a7451e37fda83465bb20 /core/resource.cpp
parentcafb888361eba08297dd88b18dc71f4d418525c0 (diff)
parent24e1039eb6fe32115e8d1a62a84965e9be19a2ed (diff)
Merge branch 'master' into tab_key
Diffstat (limited to 'core/resource.cpp')
-rw-r--r--core/resource.cpp8
1 files changed, 3 insertions, 5 deletions
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<ObjectID>::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.");
}
}