Line | Branch | Exec | Source |
---|---|---|---|
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 | // SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder | ||
5 | // SPDX-License-Identifier: GPL-3.0-or-later | ||
6 | // | ||
7 | /*! | ||
8 | * \file | ||
9 | * \ingroup Core | ||
10 | * \brief Some exceptions thrown in DuMu<sup>x</sup> | ||
11 | */ | ||
12 | #ifndef DUMUX_EXCEPTIONS_HH | ||
13 | #define DUMUX_EXCEPTIONS_HH | ||
14 | |||
15 | #include <dune/common/exceptions.hh> | ||
16 | |||
17 | #include <string> | ||
18 | |||
19 | namespace Dumux { | ||
20 | /*! | ||
21 | * \ingroup Core | ||
22 | * \brief Exception thrown if a fixable numerical problem occurs. | ||
23 | * | ||
24 | * (e.g. time step too big, etc.) | ||
25 | */ | ||
26 | 81 | class NumericalProblem : public Dune::Exception | |
27 | { | ||
28 | public: | ||
29 | // copy constructor | ||
30 | NumericalProblem(const NumericalProblem &v) | ||
31 |
7/54✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 5 taken 3 times.
✗ Branch 6 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
✓ Branch 13 taken 42 times.
✗ Branch 14 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✓ Branch 25 taken 16 times.
✗ Branch 26 not taken.
✓ Branch 29 taken 8 times.
✗ Branch 30 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✓ Branch 37 taken 3 times.
✗ Branch 38 not taken.
✗ Branch 41 not taken.
✗ Branch 42 not taken.
✗ Branch 45 not taken.
✗ Branch 46 not taken.
✗ Branch 49 not taken.
✗ Branch 50 not taken.
✗ Branch 53 not taken.
✗ Branch 54 not taken.
✗ Branch 57 not taken.
✗ Branch 58 not taken.
✗ Branch 61 not taken.
✗ Branch 62 not taken.
✗ Branch 65 not taken.
✗ Branch 66 not taken.
✗ Branch 69 not taken.
✗ Branch 70 not taken.
✗ Branch 73 not taken.
✗ Branch 74 not taken.
✗ Branch 77 not taken.
✗ Branch 78 not taken.
✗ Branch 81 not taken.
✗ Branch 82 not taken.
✗ Branch 85 not taken.
✗ Branch 86 not taken.
✗ Branch 89 not taken.
✗ Branch 90 not taken.
✗ Branch 93 not taken.
✗ Branch 94 not taken.
✗ Branch 97 not taken.
✗ Branch 98 not taken.
✗ Branch 101 not taken.
✗ Branch 102 not taken.
✗ Branch 105 not taken.
✗ Branch 106 not taken.
|
81 | : Dune::Exception(v) |
32 | {} | ||
33 | |||
34 | // default constructor | ||
35 | NumericalProblem() | ||
36 | 81 | {} | |
37 | |||
38 | // constructor with error message | ||
39 | ✗ | explicit NumericalProblem(const std::string &s) | |
40 | ✗ | { this->message(s); } | |
41 | }; | ||
42 | |||
43 | /*! | ||
44 | * \ingroup Core | ||
45 | * \brief Exception thrown if a run-time parameter is not specified correctly. | ||
46 | */ | ||
47 | ✗ | class ParameterException : public Dune::Exception | |
48 | { | ||
49 | public: | ||
50 | // copy constructor | ||
51 | ParameterException(const ParameterException &v) | ||
52 | ✗ | : Dune::Exception(v) | |
53 | {} | ||
54 | |||
55 | // default constructor | ||
56 | ParameterException() | ||
57 | ✗ | {} | |
58 | |||
59 | // constructor with error message | ||
60 | explicit ParameterException(const std::string &s) | ||
61 | { this->message(s); } | ||
62 | }; | ||
63 | |||
64 | } // namespace Dumux | ||
65 | |||
66 | #endif | ||
67 |