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

EAssertionFailed Class Reference

#include <Exception.h>

Inheritance diagram for EAssertionFailed:

EAutoBreaking Exception List of all members.

Detailed Description

The EAssertionFailed exception is thrown if there is an unexpected condition that cannot happen if the program was bug-free.

It is normally thrown by the ASSERTION macro. EAssertionFailed exceptions are usually thrown in the debug version only.

Author:
Thomas Jacob

Definition at line 275 of file Exception.h.

Public Member Functions

const char * GetClassName ()
 Returns the name of the class actually instantiated.

long GetLineNumber ()
 Returns the line number of the exception creation.

const char * GetMessage ()
 Returns the exception message.

const char * GetSource ()
 Returns the source file name of the exception creation.


Static Public Member Functions

void Assertion (bool assertion, const char *source, long lineNumber)
 Assertion for the ASSERTION macro.

void Assertion (bool assertion, const char *message, const char *source, long lineNumber)
 Assertion for the ASSERTION macro.


Protected Member Functions

void SetMessage (const char *message)
 Sets the exception text.

void SetSource (const char *source)
 Sets the source file name.


Protected Attributes

const char * ClassName
 The name of the class actually instantiated.

long LineNumber
 The line number of the exception creation.

char * Message
 The exception message text.

char * Source
 The source file name of the exception creation.


Private Member Functions

 EAssertionFailed (const char *message, const char *source, long lineNumber)
 Creates a new EAssertionFailed.


Constructor & Destructor Documentation

EAssertionFailed const char *  message,
const char *  source,
long  lineNumber
[private]
 

Creates a new EAssertionFailed.

Parameters:
message The exception message.
source The source file name of the exception creation. This parameter is usually determined by the exception macro.
lineNumber The line number of the exception creation. This parameter is usually determined by the exception macro.


Member Function Documentation

void Assertion bool  assertion,
const char *  source,
long  lineNumber
[static]
 

Assertion for the ASSERTION macro.

This method throws an EAssertionFailed exception, if the given expression isn't true. Do not call this method directly, but use the ASSERTION macro.

Parameters:
assertion The expression to be evaluated.
source The source file name of the ASSERTION macro call.
lineNumber The line number of the ASSERTION macro call.

void Assertion bool  assertion,
const char *  message,
const char *  source,
long  lineNumber
[static]
 

Assertion for the ASSERTION macro.

This method throws an EAssertionFailed exception, if the given expression isn't true. Do not call this method directly, but use the ASSERTION macro.

Parameters:
assertion The expression to be evaluated.
message The message to be displayed if the assertion fails.
source The source file name of the ASSERTION macro call.
lineNumber The line number of the ASSERTION macro call.

const char* GetClassName  )  [inline, inherited]
 

Returns the name of the class actually instantiated.

Returns:
The name of the class actually instantiated.

long GetLineNumber  )  [inline, inherited]
 

Returns the line number of the exception creation.

Returns:
The line number of the exception creation.

const char* GetMessage  )  [inline, inherited]
 

Returns the exception message.

Returns:
The exception message.

const char* GetSource  )  [inline, inherited]
 

Returns the source file name of the exception creation.

Returns:
The source file name of the exception creation.

void SetMessage const char *  message  )  [protected, inherited]
 

Sets the exception text.

Parameters:
message The new exception text.

void SetSource const char *  source  )  [protected, inherited]
 

Sets the source file name.

Parameters:
source The new source file name.


Member Data Documentation

const char* ClassName [protected, inherited]
 

The name of the class actually instantiated.

Definition at line 172 of file Exception.h.

long LineNumber [protected, inherited]
 

The line number of the exception creation.

This parameter is usually determined by the exception macro.

Definition at line 178 of file Exception.h.

char* Message [protected, inherited]
 

The exception message text.

Definition at line 183 of file Exception.h.

char* Source [protected, inherited]
 

The source file name of the exception creation.

This parameter is usually determined by the exception macro.

Definition at line 189 of file Exception.h.


The documentation for this class was generated from the following file:
Generated on Tue Oct 3 00:23:39 2006 for ToolBox by doxygen 1.3.6