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 ];
80 std::string what =
"Assertion '" + std::string(cond) +
"' failed. \n";
82 what += std::string(file) +
", line " + std::to_string(line);
84 throw std::runtime_error(what);
91void insist(
const char *cond,
const char *msg,
const char *file,
int line )
93 char* fullmsg =
new char[ strlen(cond) + strlen(msg) + strlen(file) + 500 ];
94 sprintf( fullmsg,
"%s\nAssertion '%s' failed in \n%s on line %8d.",
95 msg, cond, file, line );
void insist(const char *cond, const char *msg, const char *file, int line)
void toss_cookies(const char *cond, const char *file, int line)
assertion & operator=(const assertion &a)
assertion(const char *cond, const char *file, int line)