|
|
@@ -32,13 +32,12 @@ OTHER DEALINGS IN THE SOFTWARE.
|
|
|
#include "Log.h"
|
|
|
|
|
|
#ifdef CROWN_DEBUG
|
|
|
- #define CE_ERROR(file, line, message, ...) do { crown::Log::e(message, __VA_ARGS__);\
|
|
|
- crown::Log::e("\n\tIn %s:%d\n\n", file, line); abort(); } while(0)
|
|
|
- #define CE_ASSERT(condition, message, ...) do { if (!(condition)) { CE_ERROR(__FILE__, __LINE__,\
|
|
|
- "Assertion failed: %s\n\t" message, #condition, ##__VA_ARGS__); } } while(0)
|
|
|
+ #define CE_ASSERT(condition, ...) do { if (!(condition)) {\
|
|
|
+ crown::Log::e("Assertion failed: %s", #condition);\
|
|
|
+ crown::Log::e("\t" __VA_ARGS__);\
|
|
|
+ crown::Log::e("\n\tIn %s:%d\n\n", __FILE__, __LINE__); abort();} } while (0)
|
|
|
#else
|
|
|
#define CE_ASSERT(...) ((void)0)
|
|
|
#endif
|
|
|
|
|
|
#define CE_ASSERT_NOT_NULL(x) CE_ASSERT(x != NULL, "Parameter must be not null")
|
|
|
-
|