Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
format_exception.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
17
19#include <source_location>
20
21namespace sham {
22
36 std::string_view function_call,
37 std::string_view what,
38 const std::string &fmt_string,
39 std::source_location loc = std::source_location::current());
40
48 std::string_view, std::string_view, const std::string &, std::source_location);
49
61
70} // namespace sham
Type aliases for fmt types used throughout shamformat.
namespace for backends this one is named only sham since shambackends is too long to write
void set_format_exception_builder(format_except_builder_t callback)
Install a custom builder for format exceptions.
fmt::format_error format_error
Alias for fmt::format_error, the exception type thrown by format errors.
Definition aliases.hpp:35
sham::format_error make_format_exception(std::string_view function_call, std::string_view what, const std::string &fmt_string, std::source_location loc=std::source_location::current())
Create a format error exception.
sham::format_error(*)( std::string_view, std::string_view, const std::string &, std::source_location) format_except_builder_t
Type alias for a custom format exception builder function.
format_except_builder_t get_format_exception_builder() noexcept
Get the current format exception builder.