46 std::runtime_error(cond)
48 msg =
new char[ strlen(cond) + strlen(file) + 500 ];
49 sprintf(
msg,
"Assertion: %s, failed in %s, line %8d.",
56 msg =
new char[ strlen(m)+1 ];
61 std::runtime_error(a.msg)
63 msg =
new char[ strlen(a.
msg)+1 ];
69 msg =
new char[ strlen(a.
msg)+1 ];
82 std::string what =
"Assertion '" + std::string(cond) +
"' failed. \n";
84 what += std::string(file) +
", line " + std::to_string(line);
86 throw std::runtime_error(what);
93 void insist(
const char *cond,
const char *msg,
const char *file,
int line )
98 char* fullmsg =
new char[ strlen(cond) + strlen(msg) + strlen(file) + 500 ];
99 sprintf( fullmsg,
"%s\nAssertion '%s' failed in \n%s on line %8d.",
100 msg, cond, file, line );
assertion(const char *cond, const char *file, int line)
void insist(const char *cond, const char *msg, const char *file, int line)
assertion & operator=(const assertion &a)
void toss_cookies(const char *cond, const char *file, int line)