My Project
Exceptions.hpp
Go to the documentation of this file.
1 // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 // vi: set et ts=4 sw=4 sts=4:
3 /*****************************************************************************
4  * Copyright (C) 2013 by Andreas Lauser *
5  * *
6  * This program is free software: you can redistribute it and/or modify *
7  * it under the terms of the GNU General Public License as published by *
8  * the Free Software Foundation, either version 2 of the License, or *
9  * (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License *
17  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18  *****************************************************************************/
23 #ifndef OPM_EXCEPTIONS_HPP
24 #define OPM_EXCEPTIONS_HPP
25 
26 #include <stdexcept>
27 
28 // the OPM-specific exception classes
29 namespace Opm {
30 class NotImplemented : public std::logic_error
31 {
32 public:
33  explicit NotImplemented(const std::string &message)
34  : std::logic_error(message)
35  {}
36 };
37 
38 class NumericalProblem : public std::runtime_error
39 {
40 public:
41  explicit NumericalProblem(const std::string &message)
42  : std::runtime_error(message)
43  {}
44 };
45 
47 {
48 public:
49  explicit MaterialLawProblem(const std::string &message)
50  : NumericalProblem(message)
51  {}
52 };
53 
55 {
56 public:
57  explicit LinearSolverProblem(const std::string &message)
58  : NumericalProblem(message)
59  {}
60 };
62 {
63 public:
64  explicit TooManyIterations(const std::string &message)
65  : NumericalProblem(message)
66  {}
67 };
68 }
69 
70 #endif // OPM_EXCEPTIONS_HPP
Definition: Exceptions.hpp:55
Definition: Exceptions.hpp:47
Definition: Exceptions.hpp:31
Definition: Exceptions.hpp:39
Definition: Exceptions.hpp:62
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29