#include <iostream>
#include <string>
#include <sstream>
#include <stdexcept>
Go to the source code of this file.
◆ WBAssert
#define WBAssert |
( |
|
condition, |
|
|
|
message |
|
) |
| |
Value:do { \
if (! (condition)) { \
std::stringstream smessage; \
smessage << "Assert `" #condition "` failed in " << __FILE__ \
<< " at line " << __LINE__ << ": " << message << std::endl; \
throw std::runtime_error(smessage.str()); \
} \
} while (false)
Definition at line 28 of file assert.h.
◆ WBAssertThrow
#define WBAssertThrow |
( |
|
condition, |
|
|
|
message |
|
) |
| |
Value:do { \
if (! (condition)) { \
std::stringstream smessage; \
smessage << "AssertThrow `" #condition "` failed in " << __FILE__ \
<< " at line " << __LINE__ << ": " << message << std::endl; \
throw std::runtime_error(smessage.str()); \
} \
} while (false)
Definition at line 41 of file assert.h.