diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2023-07-21 04:45:34 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2023-07-21 04:45:34 +0200 |
commit | 5bf64255b06df4a34515516c6d6d7a1f0d49b4e3 (patch) | |
tree | 52f96d1844252c367c2e2df5cbd5c049e8ee33e6 /core/io/resource_loader.cpp | |
parent | f8dbed4d0aef09ae7f4e3d66213268dba23a31d6 (diff) | |
download | redot-engine-5bf64255b06df4a34515516c6d6d7a1f0d49b4e3.tar.gz |
Mention expected resource type in ResourceLoader load error
This helps troubleshoot issues due to incorrect import types.
Diffstat (limited to 'core/io/resource_loader.cpp')
-rw-r--r-- | core/io/resource_loader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index 1fe662b1fa..df0253349c 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -275,10 +275,10 @@ Ref<Resource> ResourceLoader::_load(const String &p_path, const String &p_origin #ifdef TOOLS_ENABLED Ref<FileAccess> file_check = FileAccess::create(FileAccess::ACCESS_RESOURCES); - ERR_FAIL_COND_V_MSG(!file_check->file_exists(p_path), Ref<Resource>(), "Resource file not found: " + p_path + "."); + ERR_FAIL_COND_V_MSG(!file_check->file_exists(p_path), Ref<Resource>(), vformat("Resource file not found: %s (expected type: %s)", p_path, p_type_hint)); #endif - ERR_FAIL_V_MSG(Ref<Resource>(), "No loader found for resource: " + p_path + "."); + ERR_FAIL_V_MSG(Ref<Resource>(), vformat("No loader found for resource: %s (expected type: %s)", p_path, p_type_hint)); } void ResourceLoader::_thread_load_function(void *p_userdata) { |