utils
module). Contains macros for error reporting. More...
#include <iostream>
Go to the source code of this file.
Defines | |
#define | REPORT std::cerr << "\nIn file " << __FILE__ << ", line " << __LINE__ << std::endl |
#define | MESSAGE(x) std::cerr << "\nIn file " << __FILE__ << ", line " << __LINE__ << ": " << x << std::endl |
#define | MESSAGE_IF(cond, m) do {if(cond) MESSAGE(m);} while(0) |
#define | THROW(x) MESSAGE(x), throw std::exception() |
Usage: THROW("Error message string.");. | |
#define | ALWAYS_ERROR_IF(condition, message) do {if(condition){ THROW(message);}} while(0) |
#define | ASSERT(cond) if (!(cond)) THROW("Assertation \'" #cond "\' failed.") |
#define | ASSERT2(cond, x) do { if (!(cond)) THROW(x);} while(0) |
#define | DEBUG_ERROR_IF(cond, x) do { if (cond) THROW(x); } while(0) |
utils
module). Contains macros for error reporting.
Definition in file errormacros.h.
#define ALWAYS_ERROR_IF | ( | condition, | |||
message | ) | do {if(condition){ THROW(message);}} while(0) |
Definition at line 87 of file errormacros.h.
#define ASSERT | ( | cond | ) | if (!(cond)) THROW("Assertation \'" #cond "\' failed.") |
Usage: ASSERT(condition) Usage: ASSERT2(condition, "Error message string.") Usage: DEBUG_ERROR_IF(condition, "Error message string.");
Definition at line 104 of file errormacros.h.
#define ASSERT2 | ( | cond, | |||
x | ) | do { if (!(cond)) THROW(x);} while(0) |
Definition at line 107 of file errormacros.h.
#define DEBUG_ERROR_IF | ( | cond, | |||
x | ) | do { if (cond) THROW(x); } while(0) |
Definition at line 111 of file errormacros.h.
#define MESSAGE | ( | x | ) | std::cerr << "\nIn file " << __FILE__ << ", line " << __LINE__ << ": " << x << std::endl |
Definition at line 75 of file errormacros.h.
#define MESSAGE_IF | ( | cond, | |||
m | ) | do {if(cond) MESSAGE(m);} while(0) |
Definition at line 78 of file errormacros.h.
#define REPORT std::cerr << "\nIn file " << __FILE__ << ", line " << __LINE__ << std::endl |
Usage: REPORT; Usage: MESSAGE("Message string.");
Definition at line 72 of file errormacros.h.
#define THROW | ( | x | ) | MESSAGE(x), throw std::exception() |