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