From 4e5310cc60dc17e5ef09e57115ca8236544679e4 Mon Sep 17 00:00:00 2001 From: qarmin Date: Wed, 26 Jun 2019 15:08:25 +0200 Subject: Some code changed with Clang-Tidy --- core/os/file_access.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/os/file_access.cpp') diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp index 913caf6584..b5580b5c6e 100644 --- a/core/os/file_access.cpp +++ b/core/os/file_access.cpp @@ -601,7 +601,8 @@ Vector FileAccess::get_file_as_array(const String &p_path, Error *r_err if (r_error) { // if error requested, do not throw error return Vector(); } - ERR_FAIL_COND_V(!f, Vector()); + ERR_EXPLAIN("Can't open file from path: " + String(p_path)); + ERR_FAIL_V(Vector()); } Vector data; data.resize(f->get_len()); @@ -621,7 +622,8 @@ String FileAccess::get_file_as_string(const String &p_path, Error *r_error) { if (r_error) { return String(); } - ERR_FAIL_COND_V(err != OK, String()); + ERR_EXPLAIN("Can't get file as string from path: " + String(p_path)); + ERR_FAIL_V(String()); } String ret; -- cgit v1.2.3