| 1 | /* This file is part of the FaCT++ DL reasoner |
| 2 | Copyright (C) 2007-2015 Dmitry Tsarkov and The University of Manchester |
| 3 | Copyright (C) 2015-2017 Dmitry Tsarkov |
| 4 | |
| 5 | This library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either |
| 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | |
| 10 | This library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | Lesser General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with this library; if not, write to the Free Software |
| 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | #ifndef EFACTPLUSPLUS_H |
| 21 | #define EFACTPLUSPLUS_H |
| 22 | |
| 23 | #include <exception> |
| 24 | |
| 25 | /// general FaCT++ exception |
| 26 | class EFaCTPlusPlus: public std::exception |
| 27 | { |
| 28 | protected: |
| 29 | /// reason of the exception |
| 30 | const char* reason = "FaCT++.Kernel: General exception"; |
| 31 | |
| 32 | public: |
| 33 | /// empty c'tor |
| 34 | EFaCTPlusPlus() = default; |
| 35 | /// init c'tor |
| 36 | explicit EFaCTPlusPlus ( const char* str ) |
| 37 | : exception() |
| 38 | , reason(str) |
| 39 | {} |
| 40 | |
| 41 | /// reason |
| 42 | const char* what ( void ) const noexcept override { return reason; } |
| 43 | }; // EFaCTPlusPlus |
| 44 | |
| 45 | #endif |