2 The software in this package is distributed under the GNU General
3 Public License version 2 (with a special exception described below).
5 A copy of GNU General Public License (GPL) is included in this distribution,
6 in the file COPYING.GPL.
8 As a special exception, if other files instantiate templates or use macros
9 or inline functions from this file, or you compile this file and link it
10 with other works to produce a work based on this file, this file
11 does not by itself cause the resulting work to be covered
12 by the GNU General Public License.
14 However the source code for this file must still be made available
15 in accordance with section (3) of the GNU General Public License.
17 This exception does not invalidate any other reasons why a work based
18 on this file might be covered by the GNU General Public License.
20 /***************************************************************************
21 exception.hxx - exception classes
23 copyright : (C) 2001 by Intra2net AG
24 ***************************************************************************/
32 #define EXCEPTION(xname,xarg) xname(xarg,__LINE__,__FILE__,__DATE__ " " __TIME__)
33 #define EXCEPTION2(xname,xarg,xarg2) xname(xarg,xarg2,__LINE__,__FILE__,__DATE__ " " __TIME__)
35 class source_info_exception
39 const char* const file;
40 const char* const timestamp;
42 source_info_exception(const int l, const char* f, const char* t)
43 : line(l), file(f), timestamp(t)
47 class runtime_error_src : public std::runtime_error, public source_info_exception
50 runtime_error_src(const std::string& __arg,const int l, const char* f, const char* t)
51 : runtime_error(__arg), source_info_exception(l,f,t) {}
54 class network_error : public runtime_error_src
57 network_error(const std::string& __arg,const int l, const char* f, const char* t)
58 : runtime_error_src(__arg,l,f,t) {}
61 class network_server_error : public network_error
64 network_server_error(const std::string& __arg,const int l, const char* f, const char* t)
65 : network_error(__arg,l,f,t) {}
68 class CONNECTION_SOCKET;
70 class network_client_error : public network_error
73 CONNECTION_SOCKET *con;
75 network_client_error(const std::string& __arg,CONNECTION_SOCKET *c, const int l, const char* f, const char* t)
76 : network_error(__arg,l,f,t), con(c) {}
79 class database_error : public runtime_error_src
82 database_error(const std::string& __arg,const int l, const char* f, const char* t)
83 : runtime_error_src(__arg,l,f,t) {}
86 class database_query_error : public database_error
89 database_query_error(const std::string& __arg,const int l, const char* f, const char* t)
90 : database_error(__arg,l,f,t) {}
93 class signal_error : public runtime_error_src
96 signal_error(const std::string& __arg,const int l, const char* f, const char* t)
97 : runtime_error_src(__arg,l,f,t) {}
100 class pipestream_error : public runtime_error_src
103 pipestream_error(const std::string& __arg,const int l, const char* f, const char* t)
104 : runtime_error_src(__arg,l,f,t) {}
107 class insocketstream_error : public runtime_error_src
110 insocketstream_error(const std::string& __arg,const int l, const char* f, const char* t)
111 : runtime_error_src(__arg,l,f,t) {}
114 class variable_data_error : public runtime_error_src
117 variable_data_error(const std::string& __arg,const int l, const char* f, const char* t)
118 : runtime_error_src(__arg,l,f,t) {}
121 class variable_range_error : public variable_data_error
124 variable_range_error(const std::string& __arg,const int l, const char* f, const char* t)
125 : variable_data_error(__arg,l,f,t) {}
128 class variable_double_error : public variable_data_error
131 variable_double_error(const std::string& __arg,const int l, const char* f, const char* t)
132 : variable_data_error(__arg,l,f,t) {}
135 class variable_ip_error : public variable_data_error
138 variable_ip_error(const std::string& __arg,const int l, const char* f, const char* t)
139 : variable_data_error(__arg,l,f,t) {}
142 class variable_integrity_error : public variable_data_error
145 variable_integrity_error(const std::string& __arg,const int l, const char* f, const char* t)
146 : variable_data_error(__arg,l,f,t) {}
149 class variable_instance_error : public variable_data_error
152 variable_instance_error(const std::string& __arg,const int l, const char* f, const char* t)
153 : variable_data_error(__arg,l,f,t) {}
156 class variable_child_error : public variable_data_error
159 variable_child_error(const std::string& __arg,const int l, const char* f, const char* t)
160 : variable_data_error(__arg,l,f,t) {}
163 class variable_notfound_error : public variable_data_error
166 variable_notfound_error(const std::string& __arg,const int l, const char* f, const char* t)
167 : variable_data_error(__arg,l,f,t) {}
170 class autoupdate_error : public runtime_error_src
173 autoupdate_error(const std::string& __arg,const int l, const char* f, const char* t)
174 : runtime_error_src(__arg,l,f,t) {}
177 class scheduler_dir_error : public runtime_error_src
180 scheduler_dir_error(const std::string& __arg,const int l, const char* f, const char* t)
181 : runtime_error_src(__arg,l,f,t) {}
184 class scheduler_prog_error : public runtime_error_src
187 scheduler_prog_error(const std::string& __arg,const int l, const char* f, const char* t)
188 : runtime_error_src(__arg,l,f,t) {}
191 class logic_error_src : public std::logic_error, public source_info_exception
194 logic_error_src(const std::string& __arg,const int l, const char* f, const char* t)
195 : logic_error(__arg), source_info_exception(l,f,t) {}
198 class argument_error : public logic_error_src
201 argument_error(const std::string& __arg,const int l, const char* f, const char* t)
202 : logic_error_src(__arg,l,f,t) {}
205 class message_error : public logic_error_src
208 message_error(const std::string& __arg,const int l, const char* f, const char* t)
209 : logic_error_src(__arg,l,f,t) {}
212 class variable_error : public logic_error_src
215 variable_error(const std::string& __arg,const int l, const char* f, const char* t)
216 : logic_error_src(__arg,l,f,t) {}