diff options
Diffstat (limited to 'scene/resources/text_file.cpp')
-rw-r--r-- | scene/resources/text_file.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/resources/text_file.cpp b/scene/resources/text_file.cpp index b84f3f1f9e..3faedc883d 100644 --- a/scene/resources/text_file.cpp +++ b/scene/resources/text_file.cpp @@ -53,9 +53,8 @@ Error TextFile::load_text(const String &p_path) { PoolVector<uint8_t> sourcef; Error err; FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err); - if (err) { - ERR_FAIL_COND_V(err, err); - } + + ERR_FAIL_COND_V_MSG(err, err, "Cannot open TextFile '" + p_path + "'."); int len = f->get_len(); sourcef.resize(len + 1); |