summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-08-17 13:04:33 +0200
committerRémi Verschelde <rverschelde@gmail.com>2019-08-17 13:31:22 +0200
commitd3153c28f0b82ca047a892f6dbcd9d5f9344e3d5 (patch)
treedc06516ab438b65a025d5e5c0bab9cc97735e2ee /core
parentde4aabe89b7b68677f145f21c956183bbc92f686 (diff)
downloadredot-engine-d3153c28f0b82ca047a892f6dbcd9d5f9344e3d5.tar.gz
Replace last occurrences of 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG'
The last remaining ERR_EXPLAIN call is in FreeType code and makes sense as is (conditionally defines the error message). There are a few ERR_EXPLAINC calls for C-strings where String is not included which can stay as is to avoid adding additional _MSGC macros just for that. Part of #31244.
Diffstat (limited to 'core')
-rw-r--r--core/io/file_access_buffered_fa.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/io/file_access_buffered_fa.h b/core/io/file_access_buffered_fa.h
index 6e806e7b3f..c8cee04208 100644
--- a/core/io/file_access_buffered_fa.h
+++ b/core/io/file_access_buffered_fa.h
@@ -40,10 +40,7 @@ class FileAccessBufferedFA : public FileAccessBuffered {
int read_data_block(int p_offset, int p_size, uint8_t *p_dest = 0) const {
- if (!f.is_open()) {
- ERR_EXPLAIN("Can't read data block, when file is not opened.");
- ERR_FAIL_V(-1);
- }
+ ERR_FAIL_COND_V_MSG(!f.is_open(), -1, "Can't read data block when file is not opened.");
((T *)&f)->seek(p_offset);