opm-common
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 #include <string>
28 
29 // the OPM-specific exception classes
30 namespace Opm {
31 class NotImplemented : public std::logic_error
32 {
33 public:
34  explicit NotImplemented(const std::string &message)
35  : std::logic_error(message)
36  {}
37 };
38 
39 class NumericalProblem : public std::runtime_error
40 {
41 public:
42  explicit NumericalProblem(const std::string &message)
43  : std::runtime_error(message)
44  {}
45 };
46 
48 {
49 public:
50  explicit ConvergenceMonitorFailure(const std::string &message)
51  : NumericalProblem(message)
52  {}
53 };
54 
56 {
57 public:
58  explicit MaterialLawProblem(const std::string &message)
59  : NumericalProblem(message)
60  {}
61 };
62 
64 {
65 public:
66  explicit LinearSolverProblem(const std::string &message)
67  : NumericalProblem(message)
68  {}
69 };
71 {
72 public:
73  explicit TooManyIterations(const std::string &message)
74  : NumericalProblem(message)
75  {}
76 };
78 {
79 public:
80  explicit TimeSteppingBreakdown(const std::string &message)
81  : NumericalProblem(message)
82  {}
83 };
84 class ReservoirCouplingError : public std::runtime_error
85 {
86 public:
87  explicit ReservoirCouplingError(const std::string &message)
88  : std::runtime_error(message)
89  {}
90 };
91 
92 }
93 #endif // OPM_EXCEPTIONS_HPP
Definition: Exceptions.hpp:39
Definition: Exceptions.hpp:31
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Definition: Exceptions.hpp:70
Definition: Exceptions.hpp:77
Definition: Exceptions.hpp:63
Definition: Exceptions.hpp:84
Definition: Exceptions.hpp:47
Definition: Exceptions.hpp:55