10 void throw_error(const std::string
&message
)
12 throw std::runtime_error
{message
};
20 void do_assert(const char *message
, int linenum
, const char *filename
, const char *funcname
) noexcept
22 /* Throwing an exception that tries to leave a noexcept function will
23 * hopefully cause the system to provide info about the caught exception in
24 * an error dialog. At least on Linux, this results in the process printing
26 * terminate called after throwing an instance of 'std::runtime_error'
27 * what(): <message here>
29 * before terminating from a SIGABRT. Hopefully Windows and Mac will do the
30 * appropriate things with the message to alert the user about an abnormal
33 auto errstr
= std::string
{filename
};
35 errstr
+= std::to_string(linenum
);