From 56e06648abbe005c28653f00d7f114bccef54381 Mon Sep 17 00:00:00 2001 From: Nick Swoboda Date: Thu, 12 Nov 2020 17:30:30 -0800 Subject: [PATCH] Improve error messages related to failing to open files (cherry picked from commit bf8f763524d6959f0bdaca31be077fbac0d73678) --- scene/resources/texture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 91a2355521a..8788190f282 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -463,7 +463,7 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &tw_ ERR_FAIL_COND_V(image.is_null(), ERR_INVALID_PARAMETER); FileAccess *f = FileAccess::open(p_path, FileAccess::READ); - ERR_FAIL_COND_V(!f, ERR_CANT_OPEN); + ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, vformat("Unable to open file: %s.", p_path)); uint8_t header[4]; f->get_buffer(header, 4);