Porytiles
Loading...
Searching...
No Matches
panic.hpp File Reference
#include <concepts>
#include <source_location>
#include <string_view>
Include dependency graph for panic.hpp:

Go to the source code of this file.

Classes

struct  porytiles::StringViewSourceLoc
 A wrapper for std::string_view with a taggable std::source_location. More...
 

Namespaces

namespace  porytiles
 

Functions

void porytiles::set_panic_stacktrace_enabled (bool enabled)
 Enables or disables stacktrace generation on panic.
 
bool porytiles::is_panic_stacktrace_enabled ()
 Returns whether stacktrace generation is enabled on panic.
 
void porytiles::panic (const StringViewSourceLoc &s)
 Unconditionally terminates the program with a panic message.
 
void porytiles::assert_or_panic (bool condition, const StringViewSourceLoc &s)
 Conditionally panics if the given condition is false.