Zipios++
fcollexceptions.cpp
Go to the documentation of this file.
1 
2 #include "zipios++/zipios-config.h"
3 
4 #include "zipios++/meta-iostreams.h"
5 
7 
8 namespace zipios {
9 
10 using std::cerr ;
11 using std::endl ;
12 
13 IOException::IOException() throw ()
14  : _what( "I/O exception" ) {}
15 
16 IOException::IOException( const string &msg ) throw ()
17  : _what( msg ) {}
18 
19 IOException::IOException( const IOException &src ) throw ()
20  : std::exception(), _what( src._what ) {}
21 
22 
23 IOException &IOException::operator= ( const IOException &src ) throw () {
24  _what = src._what ;
25  return *this ;
26 }
27 
28 
29 const char *IOException::what() const throw () {
30  return _what.c_str() ;
31 }
32 
33 IOException::~IOException() throw () {}
34 
35 
36 
37 
38 
39 
40 FCollException::FCollException() throw ()
41  : _what( "FileCollection exception" ) {}
42 
43 FCollException::FCollException( const string &msg ) throw ()
44  : _what( msg ) {}
45 
46 FCollException::FCollException( const FCollException &src ) throw ()
47  : std::exception(),_what( src._what ) {}
48 
49 
50 FCollException &FCollException::operator= ( const FCollException &src ) throw () {
51  _what = src._what ;
52  return *this ;
53 }
54 
55 
56 const char *FCollException::what() const throw () {
57  return _what.c_str() ;
58 }
59 
60 FCollException::~FCollException() throw () {}
61 
62 
63 
64 
65 
66 
67 InvalidStateException::InvalidStateException() throw ()
68  : _what( "InvalidState exception" ) {}
69 
70 InvalidStateException::InvalidStateException( const string &msg ) throw ()
71  : _what( msg ) {}
72 
73 InvalidStateException::
74 InvalidStateException( const InvalidStateException &src ) throw ()
75  : std::exception(), _what( src._what ) {}
76 
77 
78 InvalidStateException &InvalidStateException::
79 operator= ( const InvalidStateException &src ) throw () {
80  _what = src._what ;
81  return *this ;
82 }
83 
84 
85 const char *InvalidStateException::what() const throw () {
86  return _what.c_str() ;
87 }
88 
89 InvalidStateException::~InvalidStateException() throw () {}
90 
91 
92 
93 
94 
95 Exception::Exception() throw ()
96  : _what( "Exception" ) {}
97 
98 Exception::Exception( const string &msg ) throw ()
99  : _what( msg ) {}
100 
101 Exception::
102 Exception( const Exception &src ) throw ()
103  : std::exception(),_what( src._what ) {}
104 
105 
106 Exception &Exception::
107 operator= ( const Exception &src ) throw () {
108  _what = src._what ;
109  return *this ;
110 }
111 
112 
113 const char *Exception::what() const throw () {
114  return _what.c_str() ;
115 }
116 
117 Exception::~Exception() throw () {}
118 
119 
120 } // namespace
121 
127 /*
128  Zipios++ - a small C++ library that provides easy access to .zip files.
129  Copyright (C) 2000 Thomas Søndergaard
130 
131  This library is free software; you can redistribute it and/or
132  modify it under the terms of the GNU Lesser General Public
133  License as published by the Free Software Foundation; either
134  version 2 of the License, or (at your option) any later version.
135 
136  This library is distributed in the hope that it will be useful,
137  but WITHOUT ANY WARRANTY; without even the implied warranty of
138  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
139  Lesser General Public License for more details.
140 
141  You should have received a copy of the GNU Lesser General Public
142  License along with this library; if not, write to the Free Software
143  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
144 */
Header file that defines a number of exceptions used by FileCollection and its subclasses.