![]() |
KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
Extends the std::exception class with more information about error location. More...
#include <exception.h>
Public Member Functions | |
Life Cycle | |
| Exception () | |
| Default constructor. More... | |
| Exception (const std::string &rWhat) | |
| Exception (const std::string &rWhat, const CodeLocation &Location) | |
| Exception (Exception const &Other) | |
| Copy constructor. More... | |
| ~Exception () noexcept override | |
| Destructor. More... | |
Operators | |
| Exception & | operator= (Exception const &rOther)=delete |
| Assignment operator is deleted. More... | |
| Exception & | operator<< (CodeLocation const &TheLocation) |
| Code Location stream function to add callers to call stack. More... | |
| template<class StreamValueType > | |
| Exception & | operator<< (StreamValueType const &rValue) |
| string stream function More... | |
| Exception & | operator<< (std::ostream &(*pf)(std::ostream &)) |
| Manipulator stream function. More... | |
| Exception & | operator<< (const char *rString) |
| char stream function More... | |
Operations | |
| void | append_message (std::string const &rMessage) |
| void | add_to_call_stack (CodeLocation const &TheLocation) |
Access | |
| const char * | what () const noexcept override |
| The override of the base class what method. More... | |
| const std::string & | message () const |
| const CodeLocation | where () const |
Input and output | |
| virtual std::string | Info () const |
| Turn back information as a string. More... | |
| virtual void | PrintInfo (std::ostream &rOStream) const |
| Print information about this object. More... | |
| virtual void | PrintData (std::ostream &rOStream) const |
| Print object's data. More... | |
Extends the std::exception class with more information about error location.
This class extends the std::exception providing the where method which gives the location of the error. In order to have such information it is recommended to use it via KRATOS_ERROR macro.
| Kratos::Exception::Exception | ( | ) |
Default constructor.
|
explicit |
| Kratos::Exception::Exception | ( | const std::string & | rWhat, |
| const CodeLocation & | Location | ||
| ) |
| Kratos::Exception::Exception | ( | Exception const & | Other | ) |
Copy constructor.
|
overridenoexcept |
Destructor.
| void Kratos::Exception::add_to_call_stack | ( | CodeLocation const & | TheLocation | ) |
| void Kratos::Exception::append_message | ( | std::string const & | rMessage | ) |
|
virtual |
Turn back information as a string.
Reimplemented in Kratos::TestSkippedException.
| const std::string & Kratos::Exception::message | ( | ) | const |
| Exception & Kratos::Exception::operator<< | ( | CodeLocation const & | TheLocation | ) |
Code Location stream function to add callers to call stack.
| Exception & Kratos::Exception::operator<< | ( | const char * | rString | ) |
char stream function
| Exception & Kratos::Exception::operator<< | ( | std::ostream &(*)(std::ostream &) | pf | ) |
Manipulator stream function.
|
inline |
string stream function
Assignment operator is deleted.
|
virtual |
Print object's data.
Reimplemented in Kratos::TestSkippedException.
|
virtual |
Print information about this object.
Reimplemented in Kratos::TestSkippedException.
|
overridenoexcept |
The override of the base class what method.
This method returns the entire message with where information
| const CodeLocation Kratos::Exception::where | ( | ) | const |