From 5b0bf9e2b0bd252d4ab26d614aa5a94b8029daa1 Mon Sep 17 00:00:00 2001 From: Radiant <69520693+RadiantUwU@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:42:10 +0200 Subject: [PATCH] Return the actual error when an import fails. --- modules/gltf/gltf_document.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 0a487430a36..756111d08dd 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -7488,7 +7488,7 @@ Error GLTFDocument::append_from_file(String p_path, Ref p_state, uint Error err; Ref file = FileAccess::open(p_path, FileAccess::READ, &err); - ERR_FAIL_COND_V(err != OK, ERR_FILE_CANT_OPEN); + ERR_FAIL_COND_V_MSG(err != OK, err, vformat(R"(Can't open file at path "%s")", p_path)); ERR_FAIL_COND_V(file.is_null(), ERR_FILE_CANT_OPEN); String base_path = p_base_path; if (base_path.is_empty()) {