CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
src
include
base
assert.h
Go to the documentation of this file.
1
// -*- C++ -*-
14
#include <iostream>
15
#include <sstream>
16
18
#define CXZ_ERRTAG __FILE__ << '@' << __LINE__ << '(' << __func__ << "): error"
19
21
#define CXZ_WARNTAG __FILE__ << '@' << __LINE__ << ": warning"
22
26
#define CXZ_ERROR(errmsg) { \
27
auto mkerr = [&](){ std::stringstream ss; ss << CXZ_ERRTAG << ": " << errmsg << std::flush; return ss.str(); }; \
28
throw std::runtime_error(mkerr()); }
29
33
#define CXZ_WARNING(errmsg) {\
34
std::cerr << CXZ_WARNTAG << ": " << errmsg << std::endl; }
35
40
#define CXZ_ASSERT(statement, errmsg) if(not (statement)) { CXZ_ERROR(errmsg); }
Generated by
1.10.0