R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BException.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) 2023 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3 * Copyright (C) 2023-2026 Members of R3B Collaboration *
4 * *
5 * This software is distributed under the terms of the *
6 * GNU General Public Licence (GPL) version 3, *
7 * copied verbatim in the file "LICENSE". *
8 * *
9 * In applying this license GSI does not waive the privileges and immunities *
10 * granted to it by virtue of its status as an Intergovernmental Organization *
11 * or submit itself to any jurisdiction. *
12 ******************************************************************************/
13
14#pragma once
15
16// TODO: C++20
17// use std::source_location
18#include <boost/assert/source_location.hpp>
19#include <stdexcept>
20#include <string>
21
22namespace R3B
23{
24
25 class runtime_error : public std::runtime_error
26 {
27 public:
28 explicit runtime_error(const std::string& err, const boost::source_location& loc = BOOST_CURRENT_LOCATION);
29 };
30
31 class logic_error : public std::logic_error
32 {
33 public:
34 explicit logic_error(const std::string& err, const boost::source_location& loc = BOOST_CURRENT_LOCATION);
35 };
36} // namespace R3B
logic_error(const std::string &err, const boost::source_location &loc=BOOST_CURRENT_LOCATION)
runtime_error(const std::string &err, const boost::source_location &loc=BOOST_CURRENT_LOCATION)