PRISMS-PF Manual
Loading...
Searching...
No Matches
exceptions.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2025 PRISMS Center at the University of Michigan
2// SPDX-License-Identifier: GNU Lesser General Public Version 2.1
3
4#pragma once
5
6#include <deal.II/base/exceptions.h>
7
9
10#include <prismspf/config.h>
11
13
14// NOLINTBEGIN(readability-identifier-naming)
15
20#ifdef DEBUG
21template <typename Condition, typename Exception>
22constexpr void
23AssertThrowDebug(const Condition &cond, const Exception &exc)
24{
25 AssertThrow(cond, exc);
26}
27#else
28template <typename Condition, typename Exception>
29constexpr void
30AssertThrowDebug(const Condition &, const Exception &)
31{
32 // Do nothing in release mode
33}
34#endif
35
36// NOLINTEND(readability-identifier-naming)
37
38// NOLINTBEGIN
39
45 FeatureNotImplemented,
46 std::string,
47 << "The following feature has yet to be implemented in PRISMS-PF:\n " << arg1
48 << "\nCheck the issues section of PRISMS-PF's github to see if this feature is under "
49 "development. Additionally, please considering provided a patch to PRISMS-PF if you "
50 "feel that feature is worthwhile for yourself and others.");
51
56DeclExceptionMsg(UnreachableCode, "This code should not have been reached.");
57
62DeclException2(DependencyNotFound,
64 std::string,
65 << "Attempted access of the variable with index " << arg1
66 << " and dependency type " << arg2
67 << " that was not marked as needed. Please check CustomAttributeLoader.");
68
69// NOLINTEND
70
71PRISMS_PF_END_NAMESPACE
Condition
Condition of boundary condition.
Definition constraint_parameters.h:32
PRISMS_PF_BEGIN_NAMESPACE constexpr void AssertThrowDebug(const Condition &, const Exception &)
Definition exceptions.h:30
DeclExceptionMsg(UnreachableCode, "This code should not have been reached.")
DeclException2(DependencyNotFound, Types::Index, std::string,<< "Attempted access of the variable with index "<< arg1<< " and dependency type "<< arg2<< " that was not marked as needed. Please check CustomAttributeLoader.")
DeclException1(FeatureNotImplemented, std::string,<< "The following feature has yet to be implemented in PRISMS-PF:\n "<< arg1<< "\nCheck the issues section of PRISMS-PF's github to see if this feature is under " "development. Additionally, please considering provided a patch to PRISMS-PF if you " "feel that feature is worthwhile for yourself and others.")
Definition conditional_ostreams.cc:20
unsigned int Index
Type for field indices.
Definition types.h:19