ESScript  Revision_4488
Public Member Functions | Static Public Member Functions | Protected Types | Static Private Attributes | List of all members
esysUtils::EsysAssertException Class Reference

EsysAssertException exception class. More...

#include <EsysAssertException.h>

Inheritance diagram for esysUtils::EsysAssertException:
esysUtils::EsysException

Public Member Functions

 EsysAssertException ()
 Default constructor for the exception.
 EsysAssertException (const char *cstr)
 Constructor for the exception.
 EsysAssertException (const std::string &str)
 Constructor for the exception.
 EsysAssertException (const EsysAssertException &other)
 Copy Constructor for the exception.
EsysAssertExceptionoperator= (const EsysAssertException &other) throw ( )
virtual ~EsysAssertException () throw ( )
 Destructor.
virtual const std::string & exceptionName () const
 Returns the name of the exception.
- Public Member Functions inherited from esysUtils::EsysException
 EsysException ()
 Default Constructor. Creates an exception with no message.
 EsysException (const std::string &exceptionReason)
 Constructor which creates a EsysException with the given message.
 EsysException (const char *cStr)
 Constructor which creates a EsysException with the given message.
 EsysException (const EsysException &other)
 Copy constructor.
virtual ~EsysException () throw ( )
 Destructor.
EsysExceptionoperator= (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.
const std::string & toString () const
 Return the exception message in the form <Exception Name>: <Exception Message>.
const std::string & reason () const
 Return a reference to the string that contains the exception reason.
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.
virtual const char * what () const throw ( )
 Return a description of the exception in the same format as the toString method.
void updateMessage ()
 update m_exceptionMessage after a reason update.

Static Public Member Functions

static void assertFailure (const std::string &assertion, const std::string &date, const std::string &file, int line, const std::string &errDesc)
 Builds a formatted message and throws an EsysAssertException.

Protected Types

typedef EsysException Parent
- Protected Types inherited from esysUtils::EsysException
typedef std::exception Parent

Static Private Attributes

static const std::string exceptionNameValue

Detailed Description

EsysAssertException exception class.

Description: EsysAssertException exception class. The class provides a public function returning the exception name.

Member Typedef Documentation

Constructor & Destructor Documentation

esysUtils::EsysAssertException::EsysAssertException ( )
inline

Default constructor for the exception.

References esysUtils::EsysException::updateMessage().

Referenced by assertFailure().

esysUtils::EsysAssertException::EsysAssertException ( const char *  cstr)
inline

Constructor for the exception.

References esysUtils::EsysException::updateMessage().

esysUtils::EsysAssertException::EsysAssertException ( const std::string &  str)
inline

Constructor for the exception.

References esysUtils::EsysException::updateMessage().

esysUtils::EsysAssertException::EsysAssertException ( const EsysAssertException other)
inline

Copy Constructor for the exception.

References esysUtils::EsysException::updateMessage().

virtual esysUtils::EsysAssertException::~EsysAssertException ( ) throw ( )
inlinevirtual

Destructor.

Member Function Documentation

void EsysAssertException::assertFailure ( const std::string &  assertion,
const std::string &  date,
const std::string &  file,
int  line,
const std::string &  errDesc 
)
static

Builds a formatted message and throws an EsysAssertException.

References EsysAssertException().

const std::string & EsysAssertException::exceptionName ( ) const
virtual

Returns the name of the exception.

Reimplemented from esysUtils::EsysException.

References exceptionNameValue.

EsysAssertException& esysUtils::EsysAssertException::operator= ( const EsysAssertException other) throw ( )
inline

Member Data Documentation

const std::string EsysAssertException::exceptionNameValue
staticprivate

Referenced by exceptionName().


The documentation for this class was generated from the following files: