BadgerDB
 All Classes Namespaces Functions Variables Typedefs Friends
Public Member Functions | Protected Attributes | Friends
badgerdb::BadgerDbException Class Reference

Base class for all BadgerDB-specific exceptions. More...

#include <badgerdb_exception.h>

Inheritance diagram for badgerdb::BadgerDbException:
badgerdb::BadBufferException badgerdb::BufferExceededException badgerdb::FileExistsException badgerdb::FileNotFoundException badgerdb::FileOpenException badgerdb::HashAlreadyPresentException badgerdb::HashNotFoundException badgerdb::HashTableException badgerdb::InsufficientSpaceException badgerdb::InvalidPageException badgerdb::InvalidRecordException badgerdb::InvalidSlotException badgerdb::PageNotPinnedException badgerdb::PagePinnedException badgerdb::SlotInUseException

List of all members.

Public Member Functions

 BadgerDbException (const std::string &msg)
virtual ~BadgerDbException () throw ()
virtual const std::string & message () const
virtual const char * what () const throw ()

Protected Attributes

std::string message_

Friends

std::ostream & operator<< (std::ostream &out, const BadgerDbException &exception)

Detailed Description

Base class for all BadgerDB-specific exceptions.

Definition at line 18 of file badgerdb_exception.h.


Constructor & Destructor Documentation

badgerdb::BadgerDbException::BadgerDbException ( const std::string &  msg) [explicit]

Constructs a new exception with the given message.

Parameters:
msgMessage with information about the exception.

Definition at line 12 of file badgerdb_exception.cpp.

    : message_(msg) {
}
virtual badgerdb::BadgerDbException::~BadgerDbException ( ) throw () [inline, virtual]

Destroys the exception. Does nothing special; just included to make the compiler happy.

Definition at line 31 of file badgerdb_exception.h.

{}

Member Function Documentation

virtual const std::string& badgerdb::BadgerDbException::message ( ) const [inline, virtual]

Returns a message describing the problem that caused this exception.

Returns:
Message describing the problem that caused this exception.

Definition at line 38 of file badgerdb_exception.h.

{ return message_; }
virtual const char* badgerdb::BadgerDbException::what ( ) const throw () [inline, virtual]

Returns a description of the exception.

Returns:
Description of the exception.

Definition at line 45 of file badgerdb_exception.h.

{ return message_.c_str(); }

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const BadgerDbException exception 
) [friend]

Formats this exception for printing on the given stream.

Parameters:
outStream to print exception to.
exceptionException to print.
Returns:
Stream with exception printed.

Definition at line 54 of file badgerdb_exception.h.

                                                                      {
    out << exception.message();
    return out;
  }

Member Data Documentation

std::string badgerdb::BadgerDbException::message_ [protected]

Message describing the problem that caused this exception.

Definition at line 64 of file badgerdb_exception.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Friends