xerus
a general purpose tensor library
exceptions.cpp
Go to the documentation of this file.
1 // Xerus - A General Purpose Tensor Library
2 // Copyright (C) 2014-2017 Benjamin Huber and Sebastian Wolf.
3 //
4 // Xerus is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as published
6 // by the Free Software Foundation, either version 3 of the License,
7 // or (at your option) any later version.
8 //
9 // Xerus 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 Affero General Public License for more details.
13 //
14 // You should have received a copy of the GNU Affero General Public License
15 // along with Xerus. If not, see <http://www.gnu.org/licenses/>.
16 //
17 // For further information on Xerus visit https://libXerus.org
18 // or contact us at contact@libXerus.org.
19 
25 #include <xerus/misc/exceptions.h>
26 
27 namespace xerus {
28  namespace misc {
30 
32  : error_info(_other.error_info) { }
33 
34  const char* generic_error::what() const noexcept {
35  return error_info.c_str();
36  }
37 
38  } // namespace misc
39 } // namespace xerus
The main namespace of xerus.
Definition: basic.h:37
const char * what() const noexcept override
Definition: exceptions.cpp:34
The xerus exception class.
Definition: exceptions.h:37
Header file for xerus::misc::generic_error exception class.
generic_error()
: Normal constructor without preset error_info.
Definition: exceptions.cpp:29
std::string error_info
String containing all relevant information concerning this error.
Definition: exceptions.h:40