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

qgar::QgarErrorAlgorithm Class Reference
[Qgar specific exceptions]

#include <qgarlib/QgarErrorAlgorithm.H>

Inheritance diagram for qgar::QgarErrorAlgorithm:

qgar::AbstractQgarError List of all members.

Detailed Description

Class for Qgar algorithm exceptions.

An algorithm exception is raised when an algorithm fails for a reason that is in no way due to a bad implementation and that cannot be normally anticipated by the user: For example, initial conditions that cannot be set from the data set.

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

Definition at line 73 of file QgarErrorAlgorithm.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
 QgarErrorAlgorithm (const char *aFuncProfile)
 Construct from the profile of the function throwing the exception, without displaying any error message.
 QgarErrorAlgorithm (const char *aFileName, int aLineNumber, const char *aFuncProfile, const std::string aDiagnostic)
 Construct and display an error message.
Destructor
virtual ~QgarErrorAlgorithm () throw ()
 Virtual destructor.


Constructor & Destructor Documentation

qgar::QgarErrorAlgorithm::QgarErrorAlgorithm 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 61 of file QgarErrorAlgorithm.C.

qgar::QgarErrorAlgorithm::QgarErrorAlgorithm 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 72 of file QgarErrorAlgorithm.C.

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

Virtual destructor.

Definition at line 92 of file QgarErrorAlgorithm.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: