Browse Source

base: assertion errors now mention source location.

legacy
Sam Hocevar sam 11 years ago
parent
commit
82c0dd22a4
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/lol/base/assert.h

+ 3
- 3
src/lol/base/assert.h View File

@@ -102,13 +102,13 @@ static inline void DebugAbort()
*/

#define LOL_ERROR_1(t) \
Log::Error("assertion failure: " #t "\n")
Log::Error("assertion at %s:%d: %s\n", __FILE__, __LINE__, #t)

#define LOL_ERROR_2(t, s) \
Log::Error("assertion failure: %s\n", s)
Log::Error("assertion at %s:%d: %s\n", __FILE__, __LINE__, s)

#define LOL_ERROR_3(t, s, ...) \
Log::Error("assertion failure: " s "\n", __VA_ARGS__)
Log::Error("assertion at %s:%d: " s "\n", __FILE__, __LINE__, __VA_ARGS__)

#if FINAL_RELEASE
# define ASSERT(...) UNUSED(LOL_CALL(LOL_1ST, (__VA_ARGS__)))


Loading…
Cancel
Save