1*cdf0e10cSrcweir // ZipException.h: interface for the ZipException class. 2*cdf0e10cSrcweir // 3*cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////// 4*cdf0e10cSrcweir 5*cdf0e10cSrcweir #ifndef ZIPEXCPTN_HXX_INCLUDED 6*cdf0e10cSrcweir #define ZIPEXCPTN_HXX_INCLUDED 7*cdf0e10cSrcweir 8*cdf0e10cSrcweir #include <stdexcept> 9*cdf0e10cSrcweir 10*cdf0e10cSrcweir //------------------------------------------ 11*cdf0e10cSrcweir /** 12*cdf0e10cSrcweir */ 13*cdf0e10cSrcweir class RuntimeException : public std::exception 14*cdf0e10cSrcweir { 15*cdf0e10cSrcweir public: 16*cdf0e10cSrcweir RuntimeException(int Error); 17*cdf0e10cSrcweir virtual ~RuntimeException() throw(); 18*cdf0e10cSrcweir 19*cdf0e10cSrcweir int GetErrorCode() const; 20*cdf0e10cSrcweir 21*cdf0e10cSrcweir private: 22*cdf0e10cSrcweir int m_Error; 23*cdf0e10cSrcweir }; 24*cdf0e10cSrcweir 25*cdf0e10cSrcweir //------------------------------------------ 26*cdf0e10cSrcweir /** 27*cdf0e10cSrcweir */ 28*cdf0e10cSrcweir class ZipException : public RuntimeException 29*cdf0e10cSrcweir { 30*cdf0e10cSrcweir public: 31*cdf0e10cSrcweir ZipException(int Error); 32*cdf0e10cSrcweir 33*cdf0e10cSrcweir virtual const char* what() const throw(); 34*cdf0e10cSrcweir }; 35*cdf0e10cSrcweir 36*cdf0e10cSrcweir //------------------------------------------ 37*cdf0e10cSrcweir /** 38*cdf0e10cSrcweir */ 39*cdf0e10cSrcweir class Win32Exception : public RuntimeException 40*cdf0e10cSrcweir { 41*cdf0e10cSrcweir public: 42*cdf0e10cSrcweir Win32Exception(int Error); 43*cdf0e10cSrcweir virtual ~Win32Exception() throw(); 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir virtual const char* what() const throw(); 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir private: 48*cdf0e10cSrcweir void* m_MsgBuff; 49*cdf0e10cSrcweir }; 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir //------------------------------------------ 52*cdf0e10cSrcweir /** 53*cdf0e10cSrcweir */ 54*cdf0e10cSrcweir class ZipContentMissException : public ZipException 55*cdf0e10cSrcweir { 56*cdf0e10cSrcweir public: 57*cdf0e10cSrcweir ZipContentMissException(int Error); 58*cdf0e10cSrcweir }; 59*cdf0e10cSrcweir 60*cdf0e10cSrcweir //------------------------------------------ 61*cdf0e10cSrcweir /** 62*cdf0e10cSrcweir */ 63*cdf0e10cSrcweir class AccessViolationException : public Win32Exception 64*cdf0e10cSrcweir { 65*cdf0e10cSrcweir public: 66*cdf0e10cSrcweir AccessViolationException(int Error); 67*cdf0e10cSrcweir }; 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir //------------------------------------------ 70*cdf0e10cSrcweir /** 71*cdf0e10cSrcweir */ 72*cdf0e10cSrcweir class IOException : public Win32Exception 73*cdf0e10cSrcweir { 74*cdf0e10cSrcweir public: 75*cdf0e10cSrcweir IOException(int Error); 76*cdf0e10cSrcweir }; 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir #endif 79