Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef ApproxMVBB_Common_AssertionDebug_hpp
00011 #define ApproxMVBB_Common_AssertionDebug_hpp
00012
00013 #include <stdlib.h>
00014 #include <iostream>
00015 #include <typeinfo>
00016
00017 #include "ApproxMVBB/Config/Config.hpp"
00018 #include ApproxMVBB_Exception_INCLUDE_FILE
00019
00020 #ifndef NDEBUG
00021
00026 #define ApproxMVBB_ASSERTMSG(condition , message) { if(!(condition)){ ApproxMVBB_ERRORMSG(message) } }
00027 #else
00028 #define ApproxMVBB_ASSERTMSG(condition , message) { if(!(condition)){ ApproxMVBB_ERRORMSG(message) } }
00029 #endif
00030
00031 #define ApproxMVBB_WARNINGMSG(condition , message) { if(!(condition)){ std::cerr << "WARNING: " << #condition << " : " <<std::endl<< message << std::endl << " @ " << __FILE__ << " (" << __LINE__ << ")" << std::endl;} }
00032 #define ApproxMVBB_ERRORMSG( message ) ApproxMVBB_THROWEXCEPTION( message )
00033
00034 #endif