CbmRoot
Loading...
Searching...
No Matches
Exceptions.h
Go to the documentation of this file.
1/* Copyright (C) 2023 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Felix Weiglhofer [committer] */
4#ifndef CBM_ALGO_BASE_EXCEPTIONS_H
5#define CBM_ALGO_BASE_EXCEPTIONS_H
6
7#include <exception>
8#include <string_view>
9
10#include <fmt/format.h>
11
12namespace cbm::algo
13{
14
15 namespace detail
16 {
22 struct Exception : std::runtime_error {
23 template<typename... Args>
24 Exception(std::string_view fmt, Args&&... args)
25 : std::runtime_error(fmt::format(fmt, std::forward<Args>(args)...))
26 {
27 }
28 };
29 } // namespace detail
30
35 using Exception::Exception;
36 };
37
43 using Exception::Exception;
44 };
45
46} // namespace cbm::algo
47
48#endif
Hash for CbmL1LinkKey.
Indicates an unrecoverable error. Should tear down the process.
Definition Exceptions.h:34
Base class for exceptions.
Definition Exceptions.h:22
Exception(std::string_view fmt, Args &&... args)
Definition Exceptions.h:24