diff options
Diffstat (limited to 'core/error_macros.h')
-rw-r--r-- | core/error_macros.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/core/error_macros.h b/core/error_macros.h index f72e987e23..69874e280b 100644 --- a/core/error_macros.h +++ b/core/error_macros.h @@ -136,8 +136,8 @@ extern bool _err_error_exists; if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \ _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \ return; \ - } else \ - _err_error_exists = false; \ + } \ + _err_error_exists = false; \ } while (0); // (*) /** An index has failed if m_index<0 or m_index >=m_size, the function exits. @@ -150,8 +150,8 @@ extern bool _err_error_exists; if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \ _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \ return m_retval; \ - } else \ - _err_error_exists = false; \ + } \ + _err_error_exists = false; \ } while (0); // (*) /** An index has failed if m_index >=m_size, the function exits. @@ -164,8 +164,8 @@ extern bool _err_error_exists; if (unlikely((m_index) >= (m_size))) { \ _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \ return m_retval; \ - } else \ - _err_error_exists = false; \ + } \ + _err_error_exists = false; \ } while (0); // (*) /** Use this one if there is no sensible fallback, that is, the error is unrecoverable. @@ -188,8 +188,8 @@ extern bool _err_error_exists; if (unlikely(!m_param)) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Parameter ' " _STR(m_param) " ' is null."); \ return; \ - } else \ - _err_error_exists = false; \ + } \ + _err_error_exists = false; \ } #define ERR_FAIL_NULL_V(m_param, m_retval) \ @@ -197,8 +197,8 @@ extern bool _err_error_exists; if (unlikely(!m_param)) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Parameter ' " _STR(m_param) " ' is null."); \ return m_retval; \ - } else \ - _err_error_exists = false; \ + } \ + _err_error_exists = false; \ } /** An error condition happened (m_cond tested true) (WARNING this is the opposite as assert(). @@ -210,8 +210,8 @@ extern bool _err_error_exists; if (unlikely(m_cond)) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition ' " _STR(m_cond) " ' is true."); \ return; \ - } else \ - _err_error_exists = false; \ + } \ + _err_error_exists = false; \ } /** Use this one if there is no sensible fallback, that is, the error is unrecoverable. @@ -236,8 +236,8 @@ extern bool _err_error_exists; if (unlikely(m_cond)) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition ' " _STR(m_cond) " ' is true. returned: " _STR(m_retval)); \ return m_retval; \ - } else \ - _err_error_exists = false; \ + } \ + _err_error_exists = false; \ } /** An error condition happened (m_cond tested true) (WARNING this is the opposite as assert(). @@ -249,8 +249,8 @@ extern bool _err_error_exists; if (unlikely(m_cond)) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition ' " _STR(m_cond) " ' is true. Continuing..:"); \ continue; \ - } else \ - _err_error_exists = false; \ + } \ + _err_error_exists = false; \ } /** An error condition happened (m_cond tested true) (WARNING this is the opposite as assert(). @@ -262,8 +262,8 @@ extern bool _err_error_exists; if (unlikely(m_cond)) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition ' " _STR(m_cond) " ' is true. Breaking..:"); \ break; \ - } else \ - _err_error_exists = false; \ + } \ + _err_error_exists = false; \ } /** Print an error string and return |