Exception thrown when access to an undefined data is attempted.
More...
#include <Solid.hpp>
|
std::string | what_message_ |
| The complete what() message (with the location part)
|
|
std::string | raw_message_ |
| Incomplete message (might be useful if we catch an exception to tailor a more specific message).
|
|
Exception thrown when access to an undefined data is attempted.
◆ UndefinedData() [1/3]
MoReFEM::SolidNS::UndefinedData::UndefinedData |
( |
const std::string & | data, |
|
|
const std::source_location | location = std::source_location::current() ) |
|
explicit |
Constructor with simple message.
- Parameters
-
[in] | data | Name of the data concerned, e.g. 'volumic mass'. |
- Parameters
-
[in] | location | STL object with relevant information about the calling site (usually to help when an exception is thrown. |
◆ UndefinedData() [2/3]
MoReFEM::SolidNS::UndefinedData::UndefinedData |
( |
const UndefinedData & | rhs | ) |
|
|
default |
The copy constructor.
- Parameters
-
[in] | rhs | The object from which the construction occurs. |
◆ UndefinedData() [3/3]
MoReFEM::SolidNS::UndefinedData::UndefinedData |
( |
UndefinedData && | rhs | ) |
|
|
default |
The move constructor.
- Parameters
-
[in] | rhs | The object from which the construction occurs. |
◆ operator=() [1/2]
The (copy) operator=.
- Parameters
-
[in] | rhs | The object from which the affectation occurs. |
- Returns
- Reference to the object (to enable chained affectation).
◆ operator=() [2/2]
The (move) operator=.
- Parameters
-
[in] | rhs | The object from which the affectation occurs. |
- Returns
- Reference to the object (to enable chained affectation).
◆ what()
virtual const char * MoReFEM::Exception::what |
( |
| ) |
const |
|
finaloverridevirtualnoexceptinherited |
Display the what message from std::exception.
- Returns
- The what() message as a char* (which reads the internal std::string so no risk of deallocation issue).
◆ GetRawMessage()
const std::string & MoReFEM::Exception::GetRawMessage |
( |
| ) |
const |
|
noexceptinherited |
Display the raw message (Without file and line).
Might be useful if exception is caught to rewrite a more refined message.
Before introducing this, we could end up in some cases with something like:
* Exception caught: Exception found at Sources/Model/Internal/InitializeHelper.hxx, line 114: Ill-defined
* finite element space 1: Exception found at Sources/Model/Internal/InitializeHelper.hxx, line 101:
* Domain 1 is not defined!
*
Clearly it is nicer to provide:
* Exception caught: Exception found at Sources/Model/Internal/InitializeHelper.hxx, line 114: Ill-defined
* finite element space 1: Domain 1 is not defined!
*
- Returns
- Exception error message without information about file and line in which the exception was invoked.
The documentation for this class was generated from the following file:
- /builds/2mk6rsew/0/MoReFEM/CoreLibrary/MoReFEM/Sources/ParameterInstances/Compound/Solid/Exceptions/Solid.hpp