sandbox
Loading...
Searching...
No Matches
exception.hpp
1// SPDX-License-Identifier: MIT
2#ifndef LIBSBX_UTILITY_EXCEPTION_HPP_
3#define LIBSBX_UTILITY_EXCEPTION_HPP_
4
5#include <concepts>
6#include <string_view>
7#include <source_location>
8#include <iostream>
9#include <exception>
10#include <stdexcept>
11
12#include <fmt/format.h>
13
14#include <libsbx/utility/target.hpp>
15
16namespace sbx::utility {
17
18struct runtime_error : public std::runtime_error {
19
20 template<typename... Args>
21 runtime_error(fmt::format_string<Args...> fmt, Args&&... args)
22 : std::runtime_error{fmt::format(fmt, std::forward<Args>(args)...)} { }
23
24}; // struct runtime_error
25
26} // namespace sbx::utility
27
28#endif // LIBSBX_UTILITY_EXCEPTION_HPP_
Definition: exception.hpp:18