CppUnit project page | FAQ | CppUnit home page

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Types | Protected Attributes
Exception Class Reference
Browsing collected test result

Exceptions thrown by failed assertions.Exception is an exception that serves descriptive strings through its what() method. More...

`#include <Exception.h>`

Collaboration diagram for Exception:
[legend]

List of all members.

## Public Member Functions
| Exception (const Message &message=Message(), const SourceLine &sourceLine=SourceLine())
| Constructs the exception with the specified message and source location.
| Exception (const Exception &other)
| Constructs a copy of an exception.
virtual | ~Exception () throw ()
| Destructs the exception.
Exception & | operator= (const Exception &other)
| Performs an assignment.
const char * | what () const throw ()
| Returns descriptive message.
SourceLine | sourceLine () const
| Location where the error occured.
Message | message () const
| Message related to the exception.
void | setMessage (const Message &message)
| Set the message.
virtual Exception * | clone () const
| Clones the exception.
## Protected Types
typedef std::exception | SuperClass
## Protected Attributes
Message | m_message
SourceLine | m_sourceLine
std::string | m_whatMessage

## Detailed Description

Exceptions thrown by failed assertions.

Exception is an exception that serves descriptive strings through its what() method.

## Member Typedef Documentation

typedef std::exception Exception::SuperClass`[protected]`

## Constructor & Destructor Documentation

Exception::Exception | ( | const Message & | message = `Message()`,
|  | const SourceLine & | sourceLine = `SourceLine()`
| ) |  |

Constructs the exception with the specified message and source location.

Parameters:

  message | Message associated to the exception.
  sourceLine | Source location related to the exception.

CPPUNIT_NS_BEGIN Exception::Exception | ( | const Exception & | other | ) |

Constructs a copy of an exception.

Parameters:

  other | Exception to copy.

Exception::~Exception | ( |  | ) | throw ()`[virtual]`

Destructs the exception.

## Member Function Documentation

Exception * Exception::clone | ( |  | ) | const`[virtual]`

Clones the exception.

Message Exception::message | ( |  | ) | const

Message related to the exception.

Exception & Exception::operator= | ( | const Exception & | other | ) |

Performs an assignment.

void Exception::setMessage | ( | const Message & | message | ) |

Set the message.

SourceLine Exception::sourceLine | ( |  | ) | const

Location where the error occured.

const char * Exception::what | ( |  | ) | const throw ()

Returns descriptive message.

## Member Data Documentation

Message Exception::m_message`[protected]`

SourceLine Exception::m_sourceLine`[protected]`

std::string Exception::m_whatMessage`[protected]`

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

- Exception.h
- Exception.cpp

| hosts this site. |  | Send comments to: CppUnit Developers