Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qgar::AbstractQgarError Class Reference
[Qgar specific exceptions]

#include <qgarlib/AbstractQgarError.H>

Inheritance diagram for qgar::AbstractQgarError:

qgar::QgarErrorAlgorithm qgar::QgarErrorDeveloper qgar::QgarErrorDomain qgar::QgarErrorInvalidArg qgar::QgarErrorIO qgar::QgarErrorUser List of all members.

Detailed Description

Base class for Qgar exceptions.

Author:
Gerald Masini
Date:
November 6, 2003 18:18
Since:
Qgar 2.1

Definition at line 65 of file AbstractQgarError.H.

Display

virtual void displayHeader (const char *anErrorKind) const
 Display the error message header (first line of the message), including an explicit description (in capital letters) of the error type.
static void errorMsgOn ()
 Enable the display of error messages when exceptions are raised.
static void errorMsgOff ()
 Disable the display of error messages when exceptions are raised.

Public Member Functions

Destructor
virtual ~AbstractQgarError ()
 Virtual destructor.

Protected Member Functions

Constructors
Constructors belong to the protected section so that the class cannot be instantiated.

 AbstractQgarError (const char *aFuncProfile)
 Construct without displaying any error message.
 AbstractQgarError (const char *anErrorKind, const char *aFileName, int aLineNumber, const char *aFuncProfile, const std::string aDiagnostic)
 Construct and display an error message.

Static Protected Attributes

Messages
static bool _msgFlag = true
 Display flag for error messages.


Constructor & Destructor Documentation

qgar::AbstractQgarError::~AbstractQgarError  )  [virtual]
 

Virtual destructor.

Definition at line 106 of file AbstractQgarError.C.

qgar::AbstractQgarError::AbstractQgarError const char *  aFuncProfile  )  [protected]
 

Construct without displaying any error message.

Parameters:
aFuncProfile profile of the function throwing the exception

Definition at line 68 of file AbstractQgarError.C.

qgar::AbstractQgarError::AbstractQgarError const char *  anErrorKind,
const char *  aFileName,
int  aLineNumber,
const char *  aFuncProfile,
const std::string  aDiagnostic
[protected]
 

Construct and display an error message.

An error message includes 4 lines:

  • message header, displayed by qgar::AbstractQgarError::displayErrorMessageHeader(const char*)
  • file name and line number of the corresponding throw instruction
  • function profile
  • diagnostic

Parameters:
anErrorKind explicit description (in capital letters) of the error type
aFileName name of the file including the function throwing the exception
aLineNumber line number (in the file) of the throw instruction
aFuncProfile profile of the function throwing the exception
aDiagnostic full explicit diagnostic

Definition at line 76 of file AbstractQgarError.C.

References _msgFlag, and displayHeader().


Member Function Documentation

void qgar::AbstractQgarError::displayHeader const char *  anErrorKind  )  const [virtual]
 

Display the error message header (first line of the message), including an explicit description (in capital letters) of the error type.

Parameters:
anErrorKind explicit description of the error type

Definition at line 129 of file AbstractQgarError.C.

Referenced by AbstractQgarError().

void qgar::AbstractQgarError::errorMsgOff  )  [static]
 

Disable the display of error messages when exceptions are raised.

Warning:
This is a static function.

Definition at line 123 of file AbstractQgarError.C.

References _msgFlag.

void qgar::AbstractQgarError::errorMsgOn  )  [static]
 

Enable the display of error messages when exceptions are raised.

Warning:
This is a static function.

Definition at line 117 of file AbstractQgarError.C.

References _msgFlag.


Member Data Documentation

bool qgar::AbstractQgarError::_msgFlag = true [static, protected]
 

Display flag for error messages.

When true (which is the default), an error message is displayed when a Qgar exception is raised.

Definition at line 57 of file AbstractQgarError.C.

Referenced by AbstractQgarError(), errorMsgOff(), and errorMsgOn().


The documentation for this class was generated from the following files: