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

qgar::QgarErrorDomain Class Reference
[Qgar specific exceptions]

#include <qgarlib/QgarErrorDomain.H>

Inheritance diagram for qgar::QgarErrorDomain:

qgar::AbstractQgarError List of all members.

Detailed Description

Class for Qgar domain exceptions.

A domain exception is raised when a function is called with arguments on which it is not defined.

Author:
Gerald Masini
Date:
November 12, 2003 16:02
Since:
Qgar 2.1

Definition at line 71 of file QgarErrorDomain.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

Constructors
 QgarErrorDomain (const char *aFuncProfile)
 Construct from the profile of the function throwing the exception, without displaying any error message.
 QgarErrorDomain (const char *aFileName, int aLineNumber, const char *aFuncProfile, const std::string aDiagnostic)
 Construct and display an error message.
Destructor
virtual ~QgarErrorDomain () throw ()
 Virtual destructor.


Constructor & Destructor Documentation

qgar::QgarErrorDomain::QgarErrorDomain const char *  aFuncProfile  ) 
 

Construct from the profile of the function throwing the exception, without displaying any error message.

Parameters:
aFuncProfile profile of the function throwing the exception

Definition at line 60 of file QgarErrorDomain.C.

qgar::QgarErrorDomain::QgarErrorDomain const char *  aFileName,
int  aLineNumber,
const char *  aFuncProfile,
const std::string  aDiagnostic
 

Construct and display an error message.

Parameters:
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
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

Definition at line 71 of file QgarErrorDomain.C.

qgar::QgarErrorDomain::~QgarErrorDomain  )  throw () [virtual]
 

Virtual destructor.

Definition at line 91 of file QgarErrorDomain.C.


Member Function Documentation

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

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 qgar::AbstractQgarError::AbstractQgarError().

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

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 qgar::AbstractQgarError::_msgFlag.

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

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 qgar::AbstractQgarError::_msgFlag.


Member Data Documentation

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

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 qgar::AbstractQgarError::AbstractQgarError(), qgar::AbstractQgarError::errorMsgOff(), and qgar::AbstractQgarError::errorMsgOn().


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