use exceptions instead of hard abort

This commit is contained in:
Dennis Luxen 2013-08-05 17:29:34 +02:00
parent 54302a53e1
commit 444bf41fa4

View File

@ -35,7 +35,6 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include <iostream> #include <iostream>
#define INFO(x) do {std::cout << "[i " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl;} while(0); #define INFO(x) do {std::cout << "[i " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl;} while(0);
#define ERR(x) do {std::cerr << "[! " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl; std::exit(-1);} while(0);
#define WARN(x) do {std::cerr << "[? " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl;} while(0); #define WARN(x) do {std::cerr << "[? " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl;} while(0);
#ifdef NDEBUG #ifdef NDEBUG