This header file contains utility functions related to exception handling in the code.
namespace for basic c++ utilities
std::string fmt_callstack()
Get the formatted callstack.
void set_exception_gen_callback(exception_gen_callback_t callback)
Set the exception generator callback.
std::string exception_format(SourceLocation loc)
Format the exception message with the source location information.
void(*)(std::string msg) exception_gen_callback_t
type of the exception generator callback
void(* exception_print_callback)(std::string msg)
exception print callback func ptr
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.
void exception_gen_callback(std::string msg)
The callback called when an exception is thrown.
exception_gen_callback_t get_exception_gen_callback()
Get the current exception generator callback.
This file contains the definition for the stacktrace related functionality.
provide information about the source location
std::string format_multiline() const
format the location in multiple lines