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

Exception Class Reference

#include <Exception.h>

Inheritance diagram for Exception:

EAutoBreaking EOutOfMemory EAssertionFailed EDeviceError EIllegalArgument EIllegalState EIndexOutOfBounds EInternalError EIOError ENoSuchElement ENotSupported ENullPointer List of all members.

Detailed Description

The root class for every exception.

Every time such an exception is created, a log entry is also written to help trace bugs. Use the corresponding macro to create the exception object. Use the existing sub-classes or create new exception types.

Warning:
windows.h defines the keywords GetClassName and GetMessage. In order to make this class work, windows.h must either be included before this declaration, or it must not be included at all.
Author:
Thomas Jacob

Definition at line 165 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.

virtual ~Exception ()
 Destroys the Exception.


Protected Member Functions

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

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.


Constructor & Destructor Documentation

Exception const char *  className,
const char *  message,
const char *  source,
long  lineNumber
[protected]
 

Creates a new Exception.

Parameters:
className The name of the class actually instantiated.
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.

virtual ~Exception  )  [virtual]
 

Destroys the Exception.


Member Function Documentation

const char* GetClassName  )  [inline]
 

Returns the name of the class actually instantiated.

Returns:
The name of the class actually instantiated.

long GetLineNumber  )  [inline]
 

Returns the line number of the exception creation.

Returns:
The line number of the exception creation.

const char* GetMessage  )  [inline]
 

Returns the exception message.

Returns:
The exception message.

const char* GetSource  )  [inline]
 

Returns the source file name of the exception creation.

Returns:
The source file name of the exception creation.

void SetMessage const char *  message  )  [protected]
 

Sets the exception text.

Parameters:
message The new exception text.

void SetSource const char *  source  )  [protected]
 

Sets the source file name.

Parameters:
source The new source file name.


Member Data Documentation

const char* ClassName [protected]
 

The name of the class actually instantiated.

Definition at line 172 of file Exception.h.

long LineNumber [protected]
 

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]
 

The exception message text.

Definition at line 183 of file Exception.h.

char* Source [protected]
 

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:40 2006 for ToolBox by doxygen 1.3.6