Base class for exceptions. More...
#include <BenzeneException.hpp>
Inherits std::exception.
Public Member Functions | |
BenzeneException () | |
Constructs an exception with no message. | |
BenzeneException (const std::string &message) | |
Construct an exception with the given message. | |
BenzeneException (const BenzeneException &other) | |
Needed for operator<<. | |
virtual | ~BenzeneException () throw () |
Destructor. | |
const char * | what () const throw () |
Returns the error message. | |
std::string | Response () const |
std::ostream & | Stream () |
Private Attributes | |
std::ostringstream | m_stream |
std::string | m_what |
Related Functions | |
(Note that these are not member functions.) | |
template<typename TYPE > | |
BenzeneException | operator<< (const BenzeneException &except, const TYPE &type) |
template<typename TYPE > | |
BenzeneException | operator<< (const BenzeneException &except, TYPE &type) |
Base class for exceptions.
Usage examples:
BenzeneException("Message"); BenzeneException() << "Message" << data << "more message.";
Definition at line 25 of file BenzeneException.hpp.
BenzeneException::BenzeneException | ( | ) |
Constructs an exception with no message.
Definition at line 13 of file BenzeneException.cpp.
BenzeneException::BenzeneException | ( | const std::string & | message | ) |
Construct an exception with the given message.
Definition at line 19 of file BenzeneException.cpp.
BenzeneException::BenzeneException | ( | const BenzeneException & | other | ) |
Needed for operator<<.
Definition at line 25 of file BenzeneException.cpp.
References m_stream, and Response().
BenzeneException::~BenzeneException | ( | ) | throw () [virtual] |
Destructor.
Definition at line 32 of file BenzeneException.cpp.
std::string BenzeneException::Response | ( | ) | const [inline] |
Definition at line 59 of file BenzeneException.hpp.
References m_stream.
Referenced by BenzeneException(), and what().
std::ostream & BenzeneException::Stream | ( | ) | [inline] |
Definition at line 54 of file BenzeneException.hpp.
References m_stream.
Referenced by operator<<().
const char * BenzeneException::what | ( | ) | const throw () |
Returns the error message.
Definition at line 36 of file BenzeneException.cpp.
References m_what, and Response().
Referenced by BookCommands::CmdBookOpen(), DfsCommands::CmdDBOpen(), and DfpnCommands::CmdOpenDB().
BenzeneException operator<< | ( | const BenzeneException & | except, | |
TYPE & | type | |||
) | [related] |
Definition at line 81 of file BenzeneException.hpp.
References Stream().
BenzeneException operator<< | ( | const BenzeneException & | except, | |
const TYPE & | type | |||
) | [related] |
Definition at line 70 of file BenzeneException.hpp.
References Stream().
std::ostringstream BenzeneException::m_stream [private] |
Definition at line 49 of file BenzeneException.hpp.
Referenced by BenzeneException(), Response(), and Stream().
std::string BenzeneException::m_what [mutable, private] |
Definition at line 51 of file BenzeneException.hpp.
Referenced by what().