CppUnit project page FAQ CppUnit home page

Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

CppUnit::Exception Class Reference

Exceptions thrown by failed assertions. More...

#include <Exception.h>

Inheritance diagram for CppUnit::Exception:

Inheritance graph
[legend]
Collaboration diagram for CppUnit::Exception:

Collaboration graph
[legend]
List of all members.

Public Methods

 Exception (std::string message="", long lineNumber=UNKNOWNLINENUMBER, std::string fileName=UNKNOWNFILENAME)
 Exception (const Exception &other)
 Construct the exception. More...

virtual ~Exception () throw ()
 Destruct the exception. More...

Exception & operator= (const Exception &other)
 Perform an assignment. More...

const char * what () const throw ()
 Return descriptive message. More...

long lineNumber ()
 The line on which the error occurred. More...

std::string fileName ()
 The file in which the error occurred. More...

virtual Exception * clone () const
virtual bool isInstanceOf (const Type &type) const

Static Public Methods

Type type ()

Static Public Attributes

const std::string UNKNOWNFILENAME = "<unknown>"
const long UNKNOWNLINENUMBER = -1

Private Types

typedef std::exception SuperClass

Private Attributes

std::string m_message
long m_lineNumber
std::string m_fileName

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 CppUnit::Exception::SuperClass [private]
 


Constructor & Destructor Documentation

CppUnit::Exception::Exception std::string   message = "",
long   lineNumber = UNKNOWNLINENUMBER,
std::string   fileName = UNKNOWNFILENAME
 

CppUnit::Exception::Exception const Exception &   other
 

Construct the exception.

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

Destruct the exception.


Member Function Documentation

Exception * CppUnit::Exception::clone   const [virtual]
 

Reimplemented in CppUnit::NotEqualException.

std::string CppUnit::Exception::fileName  
 

The file in which the error occurred.

bool CppUnit::Exception::isInstanceOf const Type &   exceptionType const [virtual]
 

Reimplemented in CppUnit::NotEqualException.

long CppUnit::Exception::lineNumber  
 

The line on which the error occurred.

Exception & CppUnit::Exception::operator= const Exception &   other
 

Perform an assignment.

Exception::Type CppUnit::Exception::type   [static]
 

Reimplemented in CppUnit::NotEqualException.

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

Return descriptive message.


Member Data Documentation

const std::string CppUnit::Exception::UNKNOWNFILENAME = "<unknown>" [static]
 

const long CppUnit::Exception::UNKNOWNLINENUMBER = -1 [static]
 

std::string CppUnit::Exception::m_fileName [private]
 

long CppUnit::Exception::m_lineNumber [private]
 

std::string CppUnit::Exception::m_message [private]
 


The documentation for this class was generated from the following files:
SourceForge Logo hosts this site. Send comments to:
CppUnit Developers