Main Page | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

DefectixError::ErrorMgr Class Reference

Class dedicated to error management. More...

Inheritance diagram for DefectixError::ErrorMgr:

Defectix FitsManager DefectComputer DefectSimulator DefectTrainer HaloSimulator TrailSimulator List of all members.

Public Member Functions

 ErrorMgr (const bool verbose)
 Standard constructor.

const errorCodes getError () const
 returns the current error code

void resetError ()
 reset the error code to NO_ERROR

const errorCodes printError () const
 Print a message corresponding to the current error.


Protected Member Functions

const errorCodes setError (std::string c, errorCodes e)
 Set error value and message.

void setFitsError (int status)
 Set error value when cfitsio crashes.


Protected Attributes

errorCodes _error
 Current error code.

bool _verbose
 Verbose mode.


Detailed Description

Class dedicated to error management.

The class handles errors and messages


Constructor & Destructor Documentation

DefectixError::ErrorMgr::ErrorMgr const bool  verbose  )  [inline]
 

Standard constructor.

if verbose is true, the error manager outputs debug messages.

Parameters:
verbose Set verbose mode


Member Function Documentation

const errorCodes DefectixError::ErrorMgr::setError std::string  c,
errorCodes  e
[inline, protected]
 

Set error value and message.

The function sets the error code and prints a string in debug message.

Parameters:
c debug message
e error code

void DefectixError::ErrorMgr::setFitsError int  status  )  [inline, protected]
 

Set error value when cfitsio crashes.

The function prints the cfitsio error message and then set the error code.

Parameters:
status cfitsio report status


Member Data Documentation

errorCodes DefectixError::ErrorMgr::_error [protected]
 

Current error code.

The error code corresponds to the first error.

errorCodes DefectixError::ErrorMgr::_verbose [protected]
 

Verbose mode.

If _verbose is true, debug messages are printed.


The documentation for this class was generated from the following file:
Generated on Fri Jul 2 13:08:03 2004 for defectix by doxygen 1.3.5