#include "MHO_Message.hh"
#include <sstream>
#include <stdexcept>
#include <string>
Go to the source code of this file.
◆ HOPS_ASSERT_EQUAL
#define HOPS_ASSERT_EQUAL |
( |
|
a, |
|
|
|
b |
|
) |
| |
Value: { \
if((a) != (b)) \
{ \
throw std::runtime_error(std::string(__FILE__) + std::string(":") + std::to_string(__LINE__) + \
std::string(" in ") + std::string(__PRETTY_FUNCTION__) + std::string(": ") + \
std::to_string((a)) + std::string(" != ") + std::to_string((b))); \
} \
}
◆ HOPS_ASSERT_FLOAT_LESS_THAN
#define HOPS_ASSERT_FLOAT_LESS_THAN |
( |
|
a, |
|
|
|
b |
|
) |
| |
Value: { \
std::stringstream ssa; \
ssa << a; \
std::stringstream ssb; \
ssb << b; \
if((a) > (b)) \
{ \
throw std::runtime_error(std::string(__FILE__) + std::string(":") + std::to_string(__LINE__) + \
std::string(" in ") + std::string(__PRETTY_FUNCTION__) + std::string(": ") + ssa.str() + \
std::string(" !< ") + ssb.str()); \
} \
}
◆ HOPS_ASSERT_THROW
#define HOPS_ASSERT_THROW |
( |
|
test_cond | ) |
|
Value: { \
if(!(test_cond)) \
{ \
throw std::runtime_error(std::string(__FILE__) + std::string(":") + std::to_string(__LINE__) + \
std::string(" in ") + std::string(__PRETTY_FUNCTION__)); \
} \
}
◆ HOPS_THROW
Value: { \
throw std::runtime_error(std::string(__FILE__) + std::string(":") + std::to_string(__LINE__) + std::string(" in ") + \
std::string(__PRETTY_FUNCTION__)); \
}