mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Return the actual error when an import fails.
This commit is contained in:
parent
8004c7524f
commit
5b0bf9e2b0
@ -7488,7 +7488,7 @@ Error GLTFDocument::append_from_file(String p_path, Ref<GLTFState> p_state, uint
|
|||||||
|
|
||||||
Error err;
|
Error err;
|
||||||
Ref<FileAccess> file = FileAccess::open(p_path, FileAccess::READ, &err);
|
Ref<FileAccess> 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);
|
ERR_FAIL_COND_V(file.is_null(), ERR_FILE_CANT_OPEN);
|
||||||
String base_path = p_base_path;
|
String base_path = p_base_path;
|
||||||
if (base_path.is_empty()) {
|
if (base_path.is_empty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user