#include <Exception.hpp>
Public Member Functions | |
Exception (const std::string &rMessage, const std::string &rFilename, unsigned lineNumber) | |
std::string | GetMessage () const |
std::string | GetShortMessage () const |
std::string | CheckShortMessage (std::string expected) const |
std::string | CheckShortMessageContains (std::string expected) const |
Private Attributes | |
std::string | mMessage |
std::string | mShortMessage |
Definition at line 57 of file Exception.hpp.
Exception::Exception | ( | const std::string & | rMessage, | |
const std::string & | rFilename, | |||
unsigned | lineNumber | |||
) |
Construct an exception with a message string.
rMessage | the message | |
rFilename | which source file threw the exception | |
lineNumber | which line number of the source file threw the exception |
Definition at line 34 of file Exception.cpp.
References mMessage, and mShortMessage.
std::string Exception::GetMessage | ( | ) | const |
Get the message associated with the exception with file and line number
Definition at line 50 of file Exception.cpp.
References mMessage.
Referenced by AbstractConvergenceTester< CELL, CARDIAC_PROBLEM, DIM, PROBLEM_DIM >::Converge(), and CellMLToSharedLibraryConverter::ConvertCellmlToSo().
std::string Exception::GetShortMessage | ( | ) | const |
Get the message associated with the exception
Definition at line 55 of file Exception.cpp.
References mShortMessage.
Referenced by GenericMeshReader< ELEMENT_DIM, SPACE_DIM >::GenericMeshReader(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Initialise(), and PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteApdMapFile().
std::string Exception::CheckShortMessage | ( | std::string | expected | ) | const |
Helper method for checking we have the right exception.
Checks that mShortMessage matches that given, and returns a suitable error message string if not. If they do match, returns the empty string.
expected | the expected value of mShortMessage |
Definition at line 60 of file Exception.cpp.
References mShortMessage.
std::string Exception::CheckShortMessageContains | ( | std::string | expected | ) | const |
Helper method for checking we have the right exception.
Checks that mShortMessage contains the given string, and returns a suitable error message string if not. If it does, returns the empty string.
expected | some expected substring of mShortMessage |
Definition at line 70 of file Exception.cpp.
References mShortMessage.
Referenced by CardiacSimulation::ReadParametersFromFile().
std::string Exception::mMessage [private] |
Full exception message - includes file and line number.
Definition at line 60 of file Exception.hpp.
Referenced by Exception(), and GetMessage().
std::string Exception::mShortMessage [private] |
Short exception message - just text of the exception.
Definition at line 61 of file Exception.hpp.
Referenced by CheckShortMessage(), CheckShortMessageContains(), Exception(), and GetShortMessage().