Macro Subspace :: sus_panic_with_message
Terminate the program, after printing a message.
The default behaviour of this function is to abort(). The behaviour of this
function can be overridden by defining a SUS_PROVIDE_PANIC_HANDLER()
macro
when compiling the library.
The panic message will be printed to stderr before aborting. This behaviour
can be overridden by defining a SUS_PROVIDE_PRINT_PANIC_MESSAGE_HANDLER()
macro when compiling the library. The
SUS_PROVIDE_PRINT_PANIC_MESSAGE_HANDLER()
macro receives two arguments:
- A message, which is a
const char*
, astd::string_view
or astd::string
. Overloads should be used to handle each case. - A
PanicLocation
. If theSUS_PROVIDE_PRINT_PANIC_MESSAGE_HANDLER
macro does not consume themsg
, this macro will avoid instantiating it at all.