YAMI4 C++
errors.h
1 // Copyright Maciej Sobczak 2008-2019.
2 // This file is part of YAMI4.
3 //
4 // YAMI4 is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // YAMI4 is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with YAMI4. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef YAMICPP_ERRORS_H_INCLUDED
18 #define YAMICPP_ERRORS_H_INCLUDED
19 
20 #include <yami4-core/dll.h>
21 #include <string>
22 #include <stdexcept>
23 
24 namespace yami
25 {
26 
33 class DLL yami_logic_error : public std::logic_error
34 {
35 public:
36  explicit yami_logic_error(const std::string & message)
37  : std::logic_error(message)
38  {
39  }
40 };
41 
49 class DLL yami_runtime_error : public std::runtime_error
50 {
51 public:
52  explicit yami_runtime_error(const std::string & message)
53  : std::runtime_error(message)
54  {
55  }
56 };
57 
58 } // namespace yami
59 
60 #endif // YAMICPP_ERRORS_H_INCLUDED
Namespace devoted to everything related to YAMI4.
Definition: activity_statistics_monitor.cpp:27
General exception class for reporting run-time errors.
Definition: errors.h:49
General exception class for reporting logic errors.
Definition: errors.h:33