unittest::Throwable Class Reference

#include <Assertion.hpp>

List of all members.


Detailed Description

An exception class that can be used as a base class for specific exceptions, ut4cpp catches this exception and is able to output a meaningful message.

Definition at line 50 of file Assertion.hpp.

Public Member Functions

 Throwable (string message)
 Constructs a Throwable object.
 Throwable (const Throwable &th)
 Constructs a Throwable object as a copy from another.
 Throwable (string file, int line, string message)
 Constructs a Throwable object.
virtual ~Throwable ()
 destructor
virtual string getMessage ()
 Returns a string message that describes this exception.
virtual string getPrintMessage ()
 Returns a string message that can be printed.
virtual string getExceptionName ()
 Returns the name of the exception (the default getMessage() this name).

Protected Attributes

int line
 line number where the exception occured
string file
 the source file where the exception occured
string message
 description of this exception


Constructor & Destructor Documentation

unittest::Throwable::Throwable string  message  ) 
 

Constructs a Throwable object.

Parameters:
message exception description

Definition at line 24 of file Assertion.cpp.

References file, and line.

unittest::Throwable::Throwable const Throwable th  ) 
 

Constructs a Throwable object as a copy from another.

Parameters:
th the Throwable object to copy

Definition at line 30 of file Assertion.cpp.

References file, line, and message.

unittest::Throwable::Throwable string  file,
int  line,
string  message
 

Constructs a Throwable object.

Parameters:
file source file name where the exception occured
line line number where the exception occured
message exception description

Definition at line 36 of file Assertion.cpp.


Member Function Documentation

string unittest::Throwable::getExceptionName  )  [virtual]
 

Returns the name of the exception (the default getMessage() this name).

Returns:
the name of this exception.

Definition at line 69 of file Assertion.cpp.

Referenced by getPrintMessage().

string unittest::Throwable::getMessage  )  [virtual]
 

Returns a string message that describes this exception.

Returns:
a string message that describes this exception.

Definition at line 47 of file Assertion.cpp.

References message.

Referenced by getPrintMessage().

string unittest::Throwable::getPrintMessage  )  [virtual]
 

Returns a string message that can be printed.

Returns:
a string message that can be printed.

Definition at line 53 of file Assertion.cpp.

References file, getExceptionName(), getMessage(), and line.

Referenced by unittest::TestSet::execute().


The documentation for this class was generated from the following files:
Generated on Mon Jun 5 22:05:27 2006 for ut4cpp by  doxygen 1.4.6-NO