Exception Class Reference

Base exception class - all exceptions should be derived from this class. More...

#include <exceptions.h>

Inheritance diagram for Exception:

ExceptionBadDirection ExceptionConfig ExceptionFactory ExceptionGUI ExceptionInterpreter ExceptionMatrix ExceptionObject ExceptionUnknown List of all members.

Public Member Functions

 Exception (const string &errMessage="", const char *fileName="", int lineNumber=0, const char *funcName="")
 Default constructor.
virtual ~Exception () throw ()
 Destructor.
virtual const char * what () throw ()
 Returns a C-style character string describing the general cause of the current error.
virtual void PrintErr () const
 Prints error message to the standard error (debugging purposes).
virtual void ShowErrWindow () const
 Shows window containing error message for the end user.
virtual void ShowError () const
 Shows error message.
virtual const char * GetExceptionName () const
 Returns the name of the exception.

Static Public Member Functions

static void ShowStdExceptionErr (const exception &stdException)
 Shows standard exception error message.

Private Attributes

const string message
 Error message that will be shown to the user.
const string file
 File from which the exception was thrown (debugging).
const int line
 Line in which the exception was thrown (debugging).
const string func
 Function from which the exception was thrown (debugging).

Detailed Description

Base exception class - all exceptions should be derived from this class.


Constructor & Destructor Documentation

Exception::Exception ( const string &  errMessage = "",
const char *  fileName = "",
int  lineNumber = 0,
const char *  funcName = "" 
) [inline, explicit]

Default constructor.

Parameters:
errMessage Error message that will be shown to the user
fileName File from which the exception was thrown (debugging)
lineNumber Line in which the exception was thrown (debugging)
funcName Function from which the exception was thrown (debugging)

virtual Exception::~Exception (  )  throw () [inline, virtual]

Destructor.


Member Function Documentation

virtual const char* Exception::GetExceptionName (  )  const [inline, virtual]

Returns the name of the exception.

Returns:
Exception name
This function is for debugging purposes ONLY. It's output is unspecified by standard and may differ between compilers (not portable).

void Exception::PrintErr (  )  const [virtual]

Prints error message to the standard error (debugging purposes).

void Exception::ShowError (  )  const [virtual]

Shows error message.

Display format depends on the debugging configuration. If debugging mode is turned on, text message (on the standard error) will be shown. If it's off, graphics window will be shown instead.

void Exception::ShowErrWindow (  )  const [virtual]

Shows window containing error message for the end user.

void Exception::ShowStdExceptionErr ( const exception &  stdException  )  [static]

Shows standard exception error message.

Display format depends on the debugging configuration. If debugging mode is turned on, text message (on the standard error) will be shown. If it's off, graphics window will be shown instead.

virtual const char* Exception::what (  )  throw () [inline, virtual]

Returns a C-style character string describing the general cause of the current error.

Returns:
Error message


Member Data Documentation

const string Exception::file [private]

File from which the exception was thrown (debugging).

const string Exception::func [private]

Function from which the exception was thrown (debugging).

const int Exception::line [private]

Line in which the exception was thrown (debugging).

const string Exception::message [private]

Error message that will be shown to the user.


The documentation for this class was generated from the following files:
Generated on Sun Apr 29 11:46:11 2007 for IPP/ICP2007 by  doxygen 1.4.7