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
8namespace zipios {
9
10using std::cerr ;
11using std::endl ;
12
13IOException::IOException() throw ()
14 : _what( "I/O exception" ) {}
15
16IOException::IOException( const string &msg ) throw ()
17 : _what( msg ) {}
18
19IOException::IOException( const IOException &src ) throw ()
20 : std::exception(), _what( src._what ) {}
21
22
23IOException &IOException::operator= ( const IOException &src ) throw () {
24 _what = src._what ;
25 return *this ;
26}
27
28
29const char *IOException::what() const throw () {
30 return _what.c_str() ;
31}
32
33IOException::~IOException() throw () {}
34
35
36
37
38
39
40FCollException::FCollException() throw ()
41 : _what( "FileCollection exception" ) {}
42
43FCollException::FCollException( const string &msg ) throw ()
44 : _what( msg ) {}
45
46FCollException::FCollException( const FCollException &src ) throw ()
47 : std::exception(),_what( src._what ) {}
48
49
50FCollException &FCollException::operator= ( const FCollException &src ) throw () {
51 _what = src._what ;
52 return *this ;
53}
54
55
56const char *FCollException::what() const throw () {
57 return _what.c_str() ;
58}
59
60FCollException::~FCollException() throw () {}
61
62
63
64
65
66
67InvalidStateException::InvalidStateException() throw ()
68 : _what( "InvalidState exception" ) {}
69
70InvalidStateException::InvalidStateException( const string &msg ) throw ()
71 : _what( msg ) {}
72
73InvalidStateException::
74InvalidStateException( const InvalidStateException &src ) throw ()
75 : std::exception(), _what( src._what ) {}
76
77
78InvalidStateException &InvalidStateException::
79operator= ( const InvalidStateException &src ) throw () {
80 _what = src._what ;
81 return *this ;
82}
83
84
85const char *InvalidStateException::what() const throw () {
86 return _what.c_str() ;
87}
88
89InvalidStateException::~InvalidStateException() throw () {}
90
91
92
93
94
95Exception::Exception() throw ()
96 : _what( "Exception" ) {}
97
98Exception::Exception( const string &msg ) throw ()
99 : _what( msg ) {}
100
101Exception::
102Exception( const Exception &src ) throw ()
103 : std::exception(),_what( src._what ) {}
104
105
106Exception &Exception::
107operator= ( const Exception &src ) throw () {
108 _what = src._what ;
109 return *this ;
110}
111
112
113const char *Exception::what() const throw () {
114 return _what.c_str() ;
115}
116
117Exception::~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.