1*ed2f6d3bSAndrew Rist /**************************************************************
2*ed2f6d3bSAndrew Rist  *
3*ed2f6d3bSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*ed2f6d3bSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*ed2f6d3bSAndrew Rist  * distributed with this work for additional information
6*ed2f6d3bSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*ed2f6d3bSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*ed2f6d3bSAndrew Rist  * "License"); you may not use this file except in compliance
9*ed2f6d3bSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*ed2f6d3bSAndrew Rist  *
11*ed2f6d3bSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*ed2f6d3bSAndrew Rist  *
13*ed2f6d3bSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*ed2f6d3bSAndrew Rist  * software distributed under the License is distributed on an
15*ed2f6d3bSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*ed2f6d3bSAndrew Rist  * KIND, either express or implied.  See the License for the
17*ed2f6d3bSAndrew Rist  * specific language governing permissions and limitations
18*ed2f6d3bSAndrew Rist  * under the License.
19*ed2f6d3bSAndrew Rist  *
20*ed2f6d3bSAndrew Rist  *************************************************************/
21*ed2f6d3bSAndrew Rist 
22cdf0e10cSrcweir // ZipException.h: interface for the ZipException class.
23cdf0e10cSrcweir //
24cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #ifndef ZIPEXCPTN_HXX_INCLUDED
27cdf0e10cSrcweir #define ZIPEXCPTN_HXX_INCLUDED
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include <stdexcept>
30cdf0e10cSrcweir 
31cdf0e10cSrcweir //------------------------------------------
32cdf0e10cSrcweir /**
33cdf0e10cSrcweir */
34cdf0e10cSrcweir class RuntimeException : public std::exception
35cdf0e10cSrcweir {
36cdf0e10cSrcweir public:
37cdf0e10cSrcweir 	RuntimeException(int Error);
38cdf0e10cSrcweir 	virtual ~RuntimeException() throw();
39cdf0e10cSrcweir 
40cdf0e10cSrcweir 	int GetErrorCode() const;
41cdf0e10cSrcweir 
42cdf0e10cSrcweir private:
43cdf0e10cSrcweir 	int m_Error;
44cdf0e10cSrcweir };
45cdf0e10cSrcweir 
46cdf0e10cSrcweir //------------------------------------------
47cdf0e10cSrcweir /**
48cdf0e10cSrcweir */
49cdf0e10cSrcweir class ZipException : public RuntimeException
50cdf0e10cSrcweir {
51cdf0e10cSrcweir public:
52cdf0e10cSrcweir 	ZipException(int Error);
53cdf0e10cSrcweir 
54cdf0e10cSrcweir 	virtual const char* what() const throw();
55cdf0e10cSrcweir };
56cdf0e10cSrcweir 
57cdf0e10cSrcweir //------------------------------------------
58cdf0e10cSrcweir /**
59cdf0e10cSrcweir */
60cdf0e10cSrcweir class Win32Exception : public RuntimeException
61cdf0e10cSrcweir {
62cdf0e10cSrcweir public:
63cdf0e10cSrcweir 	Win32Exception(int Error);
64cdf0e10cSrcweir 	virtual ~Win32Exception() throw();
65cdf0e10cSrcweir 
66cdf0e10cSrcweir 	virtual const char* what() const throw();
67cdf0e10cSrcweir 
68cdf0e10cSrcweir private:
69cdf0e10cSrcweir 	void* m_MsgBuff;
70cdf0e10cSrcweir };
71cdf0e10cSrcweir 
72cdf0e10cSrcweir //------------------------------------------
73cdf0e10cSrcweir /**
74cdf0e10cSrcweir */
75cdf0e10cSrcweir class ZipContentMissException : public ZipException
76cdf0e10cSrcweir {
77cdf0e10cSrcweir public:
78cdf0e10cSrcweir 	ZipContentMissException(int Error);
79cdf0e10cSrcweir };
80cdf0e10cSrcweir 
81cdf0e10cSrcweir //------------------------------------------
82cdf0e10cSrcweir /**
83cdf0e10cSrcweir */
84cdf0e10cSrcweir class AccessViolationException : public Win32Exception
85cdf0e10cSrcweir {
86cdf0e10cSrcweir public:
87cdf0e10cSrcweir 	AccessViolationException(int Error);
88cdf0e10cSrcweir };
89cdf0e10cSrcweir 
90cdf0e10cSrcweir //------------------------------------------
91cdf0e10cSrcweir /**
92cdf0e10cSrcweir */
93cdf0e10cSrcweir class IOException : public Win32Exception
94cdf0e10cSrcweir {
95cdf0e10cSrcweir public:
96cdf0e10cSrcweir 	IOException(int Error);
97cdf0e10cSrcweir };
98cdf0e10cSrcweir 
99cdf0e10cSrcweir #endif
100