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
29namespace Opm {
30class NotImplemented : public std::logic_error
31{
32public:
33 explicit NotImplemented(const std::string &message)
34 : std::logic_error(message)
35 {}
36};
37
38class NumericalProblem : public std::runtime_error
39{
40public:
41 explicit NumericalProblem(const std::string &message)
42 : std::runtime_error(message)
43 {}
44};
45
47{
48public:
49 explicit MaterialLawProblem(const std::string &message)
50 : NumericalProblem(message)
51 {}
52};
53
55{
56public:
57 explicit LinearSolverProblem(const std::string &message)
58 : NumericalProblem(message)
59 {}
60};
62{
63public:
64 explicit TooManyIterations(const std::string &message)
65 : NumericalProblem(message)
66 {}
67};
68}
69
70#endif // OPM_EXCEPTIONS_HPP
const char *const string
Definition: cJSON.h:170
Definition: Exceptions.hpp:55
LinearSolverProblem(const std::string &message)
Definition: Exceptions.hpp:57
Definition: Exceptions.hpp:47
MaterialLawProblem(const std::string &message)
Definition: Exceptions.hpp:49
Definition: Exceptions.hpp:31
NotImplemented(const std::string &message)
Definition: Exceptions.hpp:33
Definition: Exceptions.hpp:39
NumericalProblem(const std::string &message)
Definition: Exceptions.hpp:41
Definition: Exceptions.hpp:62
TooManyIterations(const std::string &message)
Definition: Exceptions.hpp:64
Definition: A.hpp:4