blob: 39b7f0d0d05c0e4d7e7ab42f091ac9b70e84f6a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include <exception>
#include <format>
#include <source_location>
#include <stdexcept>
#include <string_view>
namespace kstd::os
{
auto panic(std::string_view message, std::source_location location)
{
auto full_message =
std::format("OS Panic Handler called '{}' at {}:{}", message, location.file_name(), location.line());
throw std::runtime_error{full_message};
}
} // namespace kstd::os
|