CBOE Emulator  1.0
Public Member Functions | Protected Attributes | List of all members
Exception Class Reference

An exception class. More...

#include <exceptions.hpp>

Inheritance diagram for Exception:

Public Member Functions

 Exception (const char *message)
 Constructor (C strings). More...
 
 Exception (const std::string &message)
 Constructor (C++ STL strings). More...
 
virtual ~Exception () throw ()
 Destroy this exception.
 
virtual const char * what () const throw ()
 Returns a pointer to the (constant) error description. More...
 

Protected Attributes

std::string msg_
 the error message.
 

Detailed Description

An exception class.

Constructor & Destructor Documentation

◆ Exception() [1/2]

Exception::Exception ( const char *  message)
inlineexplicit

Constructor (C strings).

Parameters
messageC-style string error message. The string contents are copied upon construction. Hence, responsibility for deleting the char* lies with the caller.

◆ Exception() [2/2]

Exception::Exception ( const std::string &  message)
inlineexplicit

Constructor (C++ STL strings).

Parameters
messageThe error message.

Member Function Documentation

◆ what()

virtual const char* Exception::what ( ) const
throw (
)
inlinevirtual

Returns a pointer to the (constant) error description.

Returns
A pointer to a const char*. The underlying memory is in possession of the Exception object. Callers must not attempt to free the memory.

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