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

Exception Class Reference

#include <Exception.h>

List of all members.


Detailed Description

An exception class.

This class should not depend on any other class should not throw any exceptions itself.

Typical usage:

  throw Exception( __FILE__, __LINE__, "describe the exception", code);
  

Author:
Author
darkeye
Version:
Revision
1.6

Definition at line 65 of file Exception.h.

Public Member Functions

 Exception (void) throw ()
 Default constructor.
 Exception (const Exception &e) throw ()
 Copy constructor.
 Exception (const char *description, int code=0) throw ()
 Construct by a description and error code.
 Exception (const char *file, unsigned int line, const char *description=0, int code=0) throw ()
 Construct by source file information, a description and error code.
 Exception (const char *file, unsigned int line, const char *description1, const char *description2, int code=0) throw ()
 Construct by source file information, a description and error code.
 Exception (const char *file, unsigned int line, const char *description1, const char *description2, const char *description3, int code=0) throw ()
 Construct by source file information, a description and error code.
 ~Exception (void) throw ()
 Desctructor.
Exceptionoperator= (const Exception &e) throw ()
 Assignment operator.
const char * getDescription (void) const throw ()
 Return the textual description of the Exception.
unsigned int getLine (void) const throw ()
 Return the line number in the source file this Exception was thrown in.
const char * getFile (void) const throw ()
 Return the source file this Exception was thrown in.
int getCode (void) const throw ()
 Return the numerical code of the Exception.


Constructor & Destructor Documentation

Exception::Exception void   )  throw () [inline]
 

Default constructor.

Definition at line 119 of file Exception.h.

Exception::Exception const Exception e  )  throw () [inline]
 

Copy constructor.

Definition at line 128 of file Exception.h.

Exception::Exception const char *  description,
int  code = 0
throw () [inline]
 

Construct by a description and error code.

Parameters:
description textual description of the exception.
code numerical error code.

Definition at line 140 of file Exception.h.

Exception::Exception const char *  file,
unsigned int  line,
const char *  description = 0,
int  code = 0
throw () [inline]
 

Construct by source file information, a description and error code.

Parameters:
file the source file the exception was thrown in.
line the line in the source file.
description textual description of the exception.
code numerical error code.

Definition at line 155 of file Exception.h.

Exception::Exception const char *  file,
unsigned int  line,
const char *  description1,
const char *  description2,
int  code = 0
throw ()
 

Construct by source file information, a description and error code.

The description is constructed from two strings, any of which may be NULL.

Parameters:
file the source file the exception was thrown in.
line the line in the source file.
description1 textual description of the exception part 1.
description2 textual description of the exception part 2.
code numerical error code.

Definition at line 65 of file Exception.cpp.

Exception::Exception const char *  file,
unsigned int  line,
const char *  description1,
const char *  description2,
const char *  description3,
int  code = 0
throw ()
 

Construct by source file information, a description and error code.

The description is constructed from three strings, any of which may be NULL.

Parameters:
file the source file the exception was thrown in.
line the line in the source file.
description1 textual description of the exception part 1.
description2 textual description of the exception part 2.
description3 textual description of the exception part 3.
code numerical error code.

Definition at line 104 of file Exception.cpp.

Exception::~Exception void   )  throw () [inline]
 

Desctructor.

Definition at line 203 of file Exception.h.


Member Function Documentation

int Exception::getCode void   )  const throw () [inline]
 

Return the numerical code of the Exception.

Returns:
the numerical code of the Exception.

Definition at line 266 of file Exception.h.

Referenced by operator<<().

const char* Exception::getDescription void   )  const throw () [inline]
 

Return the textual description of the Exception.

Returns:
the textual description of the Exception.

Definition at line 231 of file Exception.h.

Referenced by operator<<().

const char* Exception::getFile void   )  const throw () [inline]
 

Return the source file this Exception was thrown in.

Returns:
the source file this Exception was thrown in.

Definition at line 255 of file Exception.h.

Referenced by operator<<().

unsigned int Exception::getLine void   )  const throw () [inline]
 

Return the line number in the source file this Exception was thrown in.

Returns:
the line number in the source file this Exception was thrown in.

Definition at line 244 of file Exception.h.

Referenced by operator<<().

Exception& Exception::operator= const Exception e  )  throw () [inline]
 

Assignment operator.

Parameters:
e the Exception to assign this to.
Returns:
a reference to this Exception.

Definition at line 215 of file Exception.h.


The documentation for this class was generated from the following files:
Generated on Thu Apr 14 13:59:13 2005 for DarkIce by  doxygen 1.4.1