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

error.h

Go to the documentation of this file.
00001 #include<config.h>
00002 #ifdef HAVE_QCDOCOS_SCU_CHECKSUM_H
00003 #include <qcdocos/scu_checksum.h>
00004 #endif
00005 CPS_START_NAMESPACE
00011 //--------------------------------------------------------------------
00012 //  CVS keywords
00013 //
00014 //  $Author: chulwoo $
00015 //  $Date: 2006/04/18 17:21:52 $
00016 //  $Header: /space/cvs/cps/cps++/include/util/error.h,v 1.7 2006/04/18 17:21:52 chulwoo Exp $
00017 //  $Id: error.h,v 1.7 2006/04/18 17:21:52 chulwoo Exp $
00018 //  $Name: v5_0_8 $
00019 //  $Locker:  $
00020 //  $RCSfile: error.h,v $
00021 //  $Revision: 1.7 $
00022 //  $Source: /space/cvs/cps/cps++/include/util/error.h,v $
00023 //  $State: Exp $
00024 //
00025 //--------------------------------------------------------------------
00026 
00027 #ifndef INCLUDED_ERROR_H
00028 #define INCLUDED_ERROR_H  
00029 
00030 #define MAX_ERR_STR_LEN 500
00031 
00032 
00034 
00040 class Error
00041 {
00042   private:
00043 
00044 
00045     char *error_class_name;    
00046     char *error_func_name;      
00047     char *error_file_name;
00048 
00049     // Different types of error.
00050     enum{
00051         pointer,
00052         file_r,
00053         file_w,
00054         file_a,
00055         not_implemented,
00056         hardware,
00057         general,
00058         n_error_types
00059     };
00060 
00061     int exit_value[n_error_types];
00062     char* error_string[n_error_types];
00063 
00064 
00065   public:
00066     
00067     Error();
00068 
00069     virtual ~Error();
00070 
00071     void Pointer(const char*, const char*, const char*);  
00073 
00074     void FileR(const char*, const char*, const char*);
00076 
00077     void FileW(const char*, const char*, const char*);  
00079 
00080     void FileA(const char*, const char*, const char*); 
00082 
00083     void NotImplemented(const char*, const char*);
00085 
00086     void NotImplemented(const char*, const char*, const char*, ...);
00088 
00089     void Hardware(const char*, const char*, const char*, ...);
00091 
00092     void General(const char*, const char*, const char*, ...);
00094 
00095     void HdwCheck(const char *,const char *);
00096         
00097 };
00098 
00099 
00100 //------------------------------------------------------------------
00105 //------------------------------------------------------------------
00106 extern Error ERR;
00107 
00108 
00109 #endif
00110 
00111 
00112 
00113 CPS_END_NAMESPACE

Generated on Sat Oct 10 14:11:12 2009 for Columbia Physics System by  doxygen 1.3.9.1