escript
Revision_Unversioneddirectory
|
A base class for exception classes used within Esys system. More...
#include <EsysException.h>
Public Member Functions | |
EsysException () | |
Default Constructor. Creates an exception with no message. More... | |
EsysException (const std::string &exceptionReason) | |
Constructor which creates a EsysException with the given message. More... | |
EsysException (const char *cStr) | |
Constructor which creates a EsysException with the given message. More... | |
EsysException (const EsysException &other) | |
Copy constructor. More... | |
virtual | ~EsysException () throw ( ) |
Destructor. More... | |
EsysException & | operator= (const EsysException &other) throw ( ) |
Assignment needed to override any automatic assignment of std::exception, which can potentially copy around char *'s, causeing trouble in some implementations of STL. It will only copy the reason string, and update the message. More... | |
const std::string & | toString () const |
Return the exception message in the form <Exception Name>: <Exception Message>. More... | |
virtual const std::string & | exceptionName () const |
Return the name of the exception. This is expected to be overloaded in derived classes with the derived class name. More... | |
const std::string & | reason () const |
Return a reference to the string that contains the exception reason. More... | |
void | setReason (const std::string &new_reason) |
set the string for the reason for the exception. This allows ousiders to modify m_reason, but the practice is discouraged. If string insertions are required, use string methods. More... | |
virtual const char * | what () const throw ( ) |
Return a description of the exception in the same format as the toString method. More... | |
void | updateMessage () |
update m_exceptionMessage after a reason update. More... | |
Protected Types | |
typedef std::exception | Parent |
Private Attributes | |
std::string | m_reason |
std::string | m_exceptionMessage |
Static Private Attributes | |
static const std::string | exceptionNameValue |
A base class for exception classes used within Esys system.
|
protected |
EsysException::EsysException | ( | ) |
Default Constructor. Creates an exception with no message.
References updateMessage().
EsysException::EsysException | ( | const std::string & | exceptionReason | ) |
Constructor which creates a EsysException with the given message.
exceptionReason | Input - Exception message. |
References updateMessage().
EsysException::EsysException | ( | const char * | cStr | ) |
Constructor which creates a EsysException with the given message.
cStr | - Exception message. |
References updateMessage().
EsysException::EsysException | ( | const EsysException & | other | ) |
|
virtual |
Destructor.
|
virtual |
Return the name of the exception. This is expected to be overloaded in derived classes with the derived class name.
Reimplemented in esysUtils::EsysAssertException, paso::PasoException, dudley::DudleyAdapterException, finley::FinleyAdapterException, escript::SplitWorldException, escript::DataException, escript::FunctionSpaceException, escript::TransportProblemException, escript::SystemMatrixException, escript::DomainException, escript::SolverOptionsException, ripley::RipleyException, and speckley::SpeckleyException.
References exceptionNameValue.
Referenced by updateMessage().
EsysException & EsysException::operator= | ( | const EsysException & | other | ) | |
throw | ( | ||||
) |
Assignment needed to override any automatic assignment of std::exception, which can potentially copy around char *'s, causeing trouble in some implementations of STL. It will only copy the reason string, and update the message.
References m_reason, and updateMessage().
Referenced by esysUtils::EsysAssertException::operator=().
|
inline |
Return a reference to the string that contains the exception reason.
References m_reason.
|
inline |
set the string for the reason for the exception. This allows ousiders to modify m_reason, but the practice is discouraged. If string insertions are required, use string methods.
References m_reason, and updateMessage().
|
inline |
Return the exception message in the form <Exception Name>: <Exception Message>.
References m_exceptionMessage.
Referenced by esysUtils::operator<<().
|
inline |
update m_exceptionMessage after a reason update.
References exceptionName(), m_exceptionMessage, and m_reason.
Referenced by escript::DataException::DataException(), escript::DomainException::DomainException(), dudley::DudleyAdapterException::DudleyAdapterException(), esysUtils::EsysAssertException::EsysAssertException(), EsysException(), finley::FinleyAdapterException::FinleyAdapterException(), escript::FunctionSpaceException::FunctionSpaceException(), escript::DomainException::operator=(), escript::DataException::operator=(), escript::SystemMatrixException::operator=(), escript::FunctionSpaceException::operator=(), escript::SplitWorldException::operator=(), escript::TransportProblemException::operator=(), esysUtils::EsysAssertException::operator=(), dudley::DudleyAdapterException::operator=(), finley::FinleyAdapterException::operator=(), paso::PasoException::operator=(), operator=(), paso::PasoException::PasoException(), setReason(), escript::SplitWorldException::SplitWorldException(), escript::SystemMatrixException::SystemMatrixException(), and escript::TransportProblemException::TransportProblemException().
|
inlinevirtual |
Return a description of the exception in the same format as the toString method.
References m_exceptionMessage.
Referenced by esysUtils::RuntimeErrorTranslator(), and esysUtils::ValueErrorTranslator().
|
staticprivate |
Referenced by exceptionName().
|
private |
Referenced by toString(), updateMessage(), and what().
|
private |
Referenced by operator=(), reason(), setReason(), and updateMessage().