CError Class Reference

#include <cerror.h>

List of all members.

Public Member Functions

 CError (int anError, string aComment)
 ~CError ()
int getType ()
string getComment ()
void describe ()

Private Attributes

int why
string comment


Detailed Description

CError class thrown when errors occur in chemcpp

Author:
Dr Jean-Luc Perret (luc@kuicr.kyoto-u.ac.jp), Kyoto University, Japan
Version:
0.3
Date:
17 Jan 2004
CLASS NAME: CError

FOR: SNSF SPONSORED PROJECT

PURPOSE: implements error message thrown by the classes in the chemcpp project.

When an error occurs an instance of this class is created and thrown. The class has two attributes: a type (integer why) and a comment (string comment). These two attributes can be retrieved using the getType() and getComment() functions. An error message corresponding to the error can also be printed on cerr using the describe() function.

The following error types are defined:

Examples:

cerror_example.cpp.


Constructor & Destructor Documentation

CError::CError int  anError,
string  aComment
 

class constructor.

CError::~CError  ) 
 

class destructor.


Member Function Documentation

void CError::describe  ) 
 

prints a description of the error to stderr.

Examples:
cerror_example.cpp.

string CError::getComment  )  [inline]
 

returns the comment associated with the error.

int CError::getType  )  [inline]
 

returns the error type.


Member Data Documentation

string CError::comment [private]
 

error comment.

int CError::why [private]
 

error type.


The documentation for this class was generated from the following file:
Generated on Wed Nov 28 12:12:51 2007 for ChemCpp by  doxygen 1.4.6