assert_always is basically fatalerror() - so it should always bail out (nw)

This commit is contained in:
Oliver Stöneberg 2015-03-20 15:42:27 +01:00
parent 6308e9f2e0
commit b41949161b

View File

@ -221,7 +221,7 @@ inline void operator--(_Type &value, int) { value = (_Type)((int)value - 1); }
#if defined(MAME_DEBUG_FAST)
#define assert(x) do { } while (0)
#define assert_always(x, msg) do { } while (0)
#define assert_always(x, msg) do { if (!(x)) throw emu_fatalerror("Fatal error: %s\nCaused by assert: %s:%d: %s", msg, __FILE__, __LINE__, #x); } while (0)
#elif defined(MAME_DEBUG)
#define assert(x) do { if (!(x)) throw emu_fatalerror("assert: %s:%d: %s", __FILE__, __LINE__, #x); } while (0)
#define assert_always(x, msg) do { if (!(x)) throw emu_fatalerror("Fatal error: %s\nCaused by assert: %s:%d: %s", msg, __FILE__, __LINE__, #x); } while (0)