diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-01-05 17:35:48 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-01-05 17:35:48 -0300 |
commit | b1ab44aa05994a19f0bae5e700c4007b870a8ecf (patch) | |
tree | f84a996964c0ccf40eeb37490990674f05f17f92 /core/bind/core_bind.cpp | |
parent | bb2341e813a14f8e4c272765c4db9584b6c5c9b1 (diff) |
Print error if a resource can't load from script, fixes #15313
Diffstat (limited to 'core/bind/core_bind.cpp')
-rw-r--r-- | core/bind/core_bind.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 27a04faef4..2921626f3a 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -71,7 +71,13 @@ Ref<ResourceInteractiveLoader> _ResourceLoader::load_interactive(const String &p RES _ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p_no_cache) { - RES ret = ResourceLoader::load(p_path, p_type_hint, p_no_cache); + Error err = OK; + RES ret = ResourceLoader::load(p_path, p_type_hint, p_no_cache, &err); + + if (err != OK) { + ERR_EXPLAIN("Error loading resource: '" + p_path + "'"); + ERR_FAIL_COND_V(err != OK, ret); + } return ret; } |