00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef zz_exception_h
00010 #define zz_exception_h
00011
00012 #include <zz_string.h>
00013 #include <zz_error.h>
00014 #include <zz_export.h>
00015
00016 #ifndef _LAF
00017
00018 #define _LAF __LINE__, __FILE__
00019 #endif
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 class ZZ_API CzzException
00035 {
00036
00037 public:
00038
00039
00040
00041
00042
00043
00044
00045
00046 CzzException( const CzzException& exceptionSrc
00047 );
00048
00049
00050
00051
00052 CzzException( int lineNumber,
00053 CzzString fileName,
00054 CzzString callId,
00055 int code,
00056 CzzString reason
00057 );
00058
00059
00060
00061
00062
00063 CzzException( int lineNumber,
00064 CzzString fileName,
00065 int code,
00066 CzzString reason
00067 );
00068
00069
00070 virtual ~CzzException();
00071
00072
00073 time_t GetOccuranceTime( void ) const;
00074
00075
00076 static CzzErrorHistory* GetErrorHistory( void );
00077
00078
00079 CzzString GetReason( void ) const;
00080
00081
00082 CzzString GetCallId( void ) const;
00083
00084
00085 CzzString GetFileName( void ) const;
00086
00087
00088 int GetLineNumber( void ) const;
00089
00090
00091 int GetCode( void ) const;
00092
00093 protected:
00094
00095
00096 void StoreInHistory( void );
00097
00098 static CzzErrorHistory* m_ErrorHistory;
00099 const time_t m_OccuranceTime;
00100 CzzString m_CallId;
00101 CzzString m_Reason;
00102 CzzString m_FileName;
00103 int m_LineNumber;
00104 int m_Code;
00105
00106 private:
00107 void CheckRemoveHistory( void );
00108
00109 };
00110
00111 #endif