cerror.h

00001 
00002 /****************************************************************************************
00003                                           cerror.h 
00004                                         ------------
00005     copyright            : (C) 2006 Jean-Luc Perret - Pierre Mahé
00006     email                : jean-luc.perret@unine.ch - pierre.mahe@ensmp.fr
00007  ***************************************************************************************/
00008 
00009 /****************************************************************************************
00010  *                                                                                      *
00011  *      This program is free software; you can redistribute it and/or                   *
00012  *      modify it under the terms of the GNU Lesser General Public                      *
00013  *      License as published by the Free Software Foundation; either                    *
00014  *      version 2.1 of the License, or (at your option) any later version.              *
00015  *                                                                                      *
00016  *      This program is distributed in the hope that it will be useful,                 *
00017  *      but WITHOUT ANY WARRANTY; without even the implied warranty of                  *
00018  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU               *
00019  *      Lesser General Public License for more details.                                 *
00020  *                                                                                      *
00021  *      You should have received a copy of the GNU Lesser General Public                *
00022  *      License along with this library; if not, write to the Free Software             *
00023  *      Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA      *
00024  *                                                                                      *
00025  ****************************************************************************************/
00026 
00027 
00028 #ifndef CERROR_H
00029 #define CERROR_H
00030 
00031 #include <string>
00032 #include <iostream>
00033 using std::string;
00034 using std::endl;
00035 using std::cout;
00036 using std::cerr;
00037 
00038 // Error codes
00039 #define BADFILE 1
00040 #define MISSINGDESCRIPTOR 2
00041 #define ATOMALREADYEXISTS 3
00042 #define NOTENOUGHATOMSINMOLECULE 4
00043 #define FILENOTFOUND 5
00044 #define ERRORNA 6
00045 #define UNKNOWNDATATYPE 7
00046 #define ERRORATOMNOTFOUND 8
00047 #define VALUENOTALLOWED 9
00048 #define NOTIMPLEMENTED 10
00049 #define NOTFOUND 11
00050 #define COULDNOTOPENFILE 12
00051 #define DUPLICATEENTRIES 13
00052 #define DEPRECATED 14
00053 #define THREADCREATIONERROR 15
00054 #define EOFERROR 16
00055 #define MISSINGDATA 17
00056 #define NOTCALCULATED 18
00057 #define BADVALUE 19
00058 #define BONDALREADYEXISTS 20
00059 #define IOERROR 21
00060 #define NOSTRUCTURE 22
00061 #define ATOMNOTFOUND 23
00062 #define SSSRNOTDETECTED 24
00063 #define MISSINGRING 25
00064 #define ATOMNOTINRING 26
00065 #define ALLNEIGHBOURSVISITED 27
00066 #define BONDNOTFOUND 28
00067 #define MOLECULENOTFOUND 29
00068 
00069 
00125 class CError {
00126 
00131 public:
00132 
00135         CError( int anError, string aComment );
00136 
00139         ~CError();
00140 
00143         int getType() { return why; }
00144         
00147         string getComment() { return comment; }
00148 
00151         void describe();
00152 
00153 private:
00156         int why;
00157         
00160         string comment;
00161 
00162 };
00163 
00164 #endif

Generated on Wed Nov 28 12:12:51 2007 for ChemCpp by  doxygen 1.4.6