COOLFluiD
Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
|
Base class for all Exceptions in CF. More...
#include <Exception.hpp>
Inherits exception.
Inherited by BadPointer, BadValue, CastingFailed, FailedAssertion, FailedToConverge, FileFormatError, FileSystemError, FloatingPointError, IllegalCall, InvalidStructure, InvalidURI, NotEnoughMemory, NotImplemented, NotSupported, OSystemError, ParallelError, ParsingFailed, ProtocolError, SegmentationFault, SetupError, ShouldNotBeHere, SignalError, URLError, ValueExists, ValueNotFound, XmlError, OutOfBounds, ZeroDeterminant, CGNSException, NetworkError, and UnknownClientId.
Public Member Functions | |
virtual | ~Exception () throw () |
Default copy constructor. More... | |
std::string | full_description () const throw () |
Returns a verbose message with all information about this exception. More... | |
const std::string & | str () const throw () |
Gets the what description string which does not contain EOL's. More... | |
const char * | what () const throw () |
void | append (const std::string &add) throw () |
std::string | type_name () const throw () |
std::string | msg () const throw () |
Protected Member Functions | |
Exception (CodeLocation where, std::string msg, std::string className) throw () | |
Protected Attributes | |
CodeLocation | m_where |
std::string | m_msg |
Stores the message with explanation of what happened. More... | |
std::string | m_class_name |
The subclass name. More... | |
std::string | m_what |
Base class for all Exceptions in CF.
This type extends std::exception by providing an implementation for what(). It should optionally describe the situation of the exception in more detail. Information about the exception occurence may be added on the what() string or passed in separate data members defined in the derived subtypes of this class. This class is abstract. Only subclasses can be instantiated.
Definition at line 52 of file Exception.hpp.
|
virtual |
Default copy constructor.
Definition at line 70 of file Exception.cpp.
|
protected |
The constructor is protected to force the developers to create subclasses.
where | The location in the code from where the exception is raised. Typically received using FromHere() |
msg | A message describing the circumstances of this exception occurence which might be the empty string. |
className | classname of derived Exception type, giving first indication of the kind of exception. |
Definition at line 42 of file Exception.cpp.
void append | ( | const std::string & | add | ) | |
throw | ( | ||||
) |
Append the message to the what() description
add | the std::string to be appended |
Definition at line 76 of file Exception.cpp.
std::string full_description | ( | ) | const | |
throw | ( | |||
) |
Returns a verbose message with all information about this exception.
Definition at line 97 of file Exception.cpp.
|
inline |
Definition at line 74 of file Exception.hpp.
const std::string & str | ( | ) | const | |
throw | ( | |||
) |
Gets the what description string which does not contain EOL's.
Definition at line 83 of file Exception.cpp.
|
inline |
Definition at line 72 of file Exception.hpp.
const char * what | ( | ) | const | |
throw | ( | |||
) |
Definition at line 90 of file Exception.cpp.
|
protected |
The subclass name.
Definition at line 99 of file Exception.hpp.
|
protected |
Stores the message with explanation of what happened.
Definition at line 96 of file Exception.hpp.
|
protected |
Stores the full description message with explanation of what happened
Definition at line 103 of file Exception.hpp.
|
protected |
Similar to m_msg but stores from where the exception was thrown indicating the file, line and function if possible. This is an encapsulated data member, which uses value semantics, and not a reference or a pointer. A reference or a pointer in an exception leads immediately to a memory leak, so cannot be used.
Definition at line 93 of file Exception.hpp.
Send comments to: COOLFluiD Web Admin |