opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
exception_helpers.h
Go to the documentation of this file.
1#pragma once
2
3#include <format>
4#include <exception>
5#include <stdexcept>
6#include <string>
7
8namespace osc
9{
10 std::string potentially_nested_exception_to_string(const std::exception&, int indent = 0);
11
12 template<typename... Args>
13 std::runtime_error formatted_runtime_error(std::format_string<Args...> fmt, Args&&... args)
14 {
15 return std::runtime_error{std::format(fmt, std::forward<Args>(args)...)};
16 }
17}
Definition custom_decoration_generator.h:5
std::string potentially_nested_exception_to_string(const std::exception &, int indent=0)
std::runtime_error formatted_runtime_error(std::format_string< Args... > fmt, Args &&... args)
Definition exception_helpers.h:13