Improve error messages related to failing to open files
(cherry picked from commit bf8f763524
)
This commit is contained in:
parent
91c5a336e8
commit
4ec6513c42
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
ERR_FAIL_COND_V(image.is_null(), ERR_INVALID_PARAMETER);
|
||||||
|
|
||||||
FileAccess *f = FileAccess::open(p_path, FileAccess::READ);
|
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];
|
uint8_t header[4];
|
||||||
f->get_buffer(header, 4);
|
f->get_buffer(header, 4);
|
||||||
|
|
Loading…
Reference in a new issue