/*********************************************************************************************************************************** Debug Routines ***********************************************************************************************************************************/ #ifndef COMMON_DEBUG_H #define COMMON_DEBUG_H #include "common/log.h" /*********************************************************************************************************************************** NDEBUG indicates to C library routines that debugging is off -- set a more readable flag to use when debugging is on ***********************************************************************************************************************************/ #ifndef NDEBUG #define DEBUG #endif /*********************************************************************************************************************************** Assert Macros ***********************************************************************************************************************************/ #ifdef DEBUG #define ASSERT_DEBUG(condition) \ { \ if (!(condition)) \ THROW(AssertError, "assertion '%s' failed", #condition); \ } #else #define ASSERT_DEBUG(condition) #endif #endif