diff options
author | qarmin <mikrutrafal54@gmail.com> | 2019-09-25 10:28:50 +0200 |
---|---|---|
committer | qarmin <mikrutrafal54@gmail.com> | 2019-09-25 10:28:50 +0200 |
commit | 17732fe698b835c29f77c84f329b2ed6cab215ce (patch) | |
tree | b95c08185e886dc6410ba8646e5ff839382b4e01 /modules/vorbis | |
parent | e9f49a6d5ac88a6afca8a16f91a05f4fcdf5a589 (diff) |
Added some obvious errors explanations
Diffstat (limited to 'modules/vorbis')
-rw-r--r-- | modules/vorbis/audio_stream_ogg_vorbis.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp index 2f56e778b9..c330af60a4 100644 --- a/modules/vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp @@ -242,10 +242,7 @@ Error AudioStreamPlaybackOGGVorbis::set_file(const String &p_file) { stream_valid = false; Error err; f = FileAccess::open(file, FileAccess::READ, &err); - - if (err) { - ERR_FAIL_COND_V(err, err); - } + ERR_FAIL_COND_V_MSG(err, err, "Cannot open file '" + p_file + "'."); int errv = ov_open_callbacks(f, &vf, NULL, 0, _ov_callbacks); switch (errv) { @@ -294,9 +291,7 @@ Error AudioStreamPlaybackOGGVorbis::_load_stream() { Error err; f = FileAccess::open(file, FileAccess::READ, &err); - if (err) { - ERR_FAIL_COND_V(err, err); - } + ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot open file '" + file + "'."); int errv = ov_open_callbacks(f, &vf, NULL, 0, _ov_callbacks); switch (errv) { |