mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +01:00
Added continue related error macros. Also added a new type where you can put commands before continuing.
This commit is contained in:
parent
ac66ecd84a
commit
60ed46b5e6
@ -95,6 +95,36 @@
|
|||||||
} else\
|
} else\
|
||||||
((void)0)\
|
((void)0)\
|
||||||
|
|
||||||
|
#define ERR_CONTINUE(cond) \
|
||||||
|
if (cond) {\
|
||||||
|
Logger::_log_error(__FUNCTION__, __FILE__, __LINE__, "ERR_CONTINUE: \"" #cond "\" is true!"); \
|
||||||
|
continue;\
|
||||||
|
} else\
|
||||||
|
((void)0)\
|
||||||
|
|
||||||
|
#define ERR_CONTINUE_MSG(cond, msg) \
|
||||||
|
if (cond) {\
|
||||||
|
Logger::_log_error(__FUNCTION__, __FILE__, __LINE__, msg); \
|
||||||
|
continue;\
|
||||||
|
} else\
|
||||||
|
((void)0)\
|
||||||
|
|
||||||
|
#define ERR_CONTINUE_ACTION(cond, action) \
|
||||||
|
if (cond) {\
|
||||||
|
Logger::_log_error(__FUNCTION__, __FILE__, __LINE__, "ERR_CONTINUE: \"" #cond "\" is true!"); \
|
||||||
|
action;\
|
||||||
|
continue;\
|
||||||
|
} else\
|
||||||
|
((void)0)\
|
||||||
|
|
||||||
|
#define ERR_CONTINUE_ACTION_MSG(cond, action, msg) \
|
||||||
|
if (cond) {\
|
||||||
|
Logger::_log_error(__FUNCTION__, __FILE__, __LINE__, msg); \
|
||||||
|
action;\
|
||||||
|
continue;\
|
||||||
|
} else\
|
||||||
|
((void)0)\
|
||||||
|
|
||||||
#define CRASH_INDEX(index, size) \
|
#define CRASH_INDEX(index, size) \
|
||||||
if ((index < 0) || (index >= size)) {\
|
if ((index < 0) || (index >= size)) {\
|
||||||
Logger::_log_index_error(__FUNCTION__, __FILE__, __LINE__, index, size, "CRASH!"); \
|
Logger::_log_index_error(__FUNCTION__, __FILE__, __LINE__, index, size, "CRASH!"); \
|
||||||
|
Loading…
Reference in New Issue
Block a user