JayBeams  0.1
Another project to have fun coding.
assert_throw.cpp
Go to the documentation of this file.
1 #include "jb/assert_throw.hpp"
2 
3 #include <sstream>
4 #include <stdexcept>
5 
7  char const* filename, int lineno, char const* predicate) {
8  std::ostringstream os;
9  os << "assertion failed in " << filename << ":" << lineno << " - "
10  << predicate;
11  throw std::runtime_error(os.str());
12 }
void raise_assertion_failure(char const *filename, int lineno, char const *predicate)
Raise std::exception to indicate an assertion failure.
Definition: assert_throw.cpp:6