mockpp::Exception Class Reference

Base class for all mockpp exceptions. More...

Inheritance diagram for mockpp::Exception:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Exception (unsigned srcline, const char *srcfile, const String &message)
 Constructs an exception.
virtual ~Exception () throw ()
 Destroys the exception.
virtual String getMessage () const
 Returns the exception description.
unsigned getSrcLine () const
 Returns the source line where the exception occured.
String getSrcFile () const
 Returns the source file name where the exception occured.
virtual const char * what () const throw ()
 Returns the exception description.

Detailed Description

Base class for all mockpp exceptions.

The main purpose of such exceptions is to provide information about the location and the cause of failed actions.

Definition at line 45 of file Exception.h.


Constructor & Destructor Documentation

mockpp::Exception::Exception ( unsigned  srcline,
const char *  srcfile,
const String message 
)

Constructs an exception.

Parameters:
srcline the line in the sourcefile
srcfile the name of the sourcefile
message a human readable description about the cause

Definition at line 39 of file Exception.cpp.

mockpp::Exception::~Exception (  )  throw () [virtual]

Destroys the exception.

Mainly here to enforce virtual destructors.

Definition at line 55 of file Exception.cpp.


Member Function Documentation

String mockpp::Exception::getMessage (  )  const [virtual]

Returns the exception description.

Returns:
descriptin

Reimplemented in mockpp::DynamicChainingMockError< R, I >.

Definition at line 71 of file Exception.cpp.

String mockpp::Exception::getSrcFile (  )  const

Returns the source file name where the exception occured.

Returns:
source file name

Definition at line 83 of file Exception.cpp.

unsigned mockpp::Exception::getSrcLine (  )  const

Returns the source line where the exception occured.

Returns:
source line

Definition at line 77 of file Exception.cpp.

const char * mockpp::Exception::what (  )  const throw () [virtual]

Returns the exception description.

Provided for compatibility with std::exception. If Unicode is activated you might get corrupt information if you are beyond latin1 characters.

Returns:
description as pointer to a latin1 string.

Definition at line 62 of file Exception.cpp.


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

Generated on Tue Jan 5 09:49:02 2010 for mockpp by  doxygen 1.6.1