--- /dev/null
+/***************************************************************************
+ exception.hxx - exception classes
+ -------------------
+ begin : Sat Oct 30 1999
+ copyright : (C) 1999 by STYLETEC
+ email : service@styletec.de
+ ***************************************************************************/
+
+#ifndef __EXCEPTION
+#define __EXCEPTION
+
+#include <stdexcept>
+#include <string>
+
+#define EXCEPTION(xname,xarg) xname(xarg,__LINE__,__FILE__,__DATE__ " " __TIME__)
+#define EXCEPTION2(xname,xarg,xarg2) xname(xarg,xarg2,__LINE__,__FILE__,__DATE__ " " __TIME__)
+
+class source_info_exception
+{
+ public:
+ const int line;
+ const char* const file;
+ const char* const timestamp;
+
+ source_info_exception(const int l, const char* f, const char* t)
+ : line(l), file(f), timestamp(t)
+ {}
+};
+
+class runtime_error_src : public std::runtime_error, public source_info_exception
+{
+ public:
+ runtime_error_src(const std::string& __arg,const int l, const char* f, const char* t)
+ : runtime_error(__arg), source_info_exception(l,f,t) {}
+};
+
+class network_error : public runtime_error_src
+{
+ public:
+ network_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : runtime_error_src(__arg,l,f,t) {}
+};
+
+class network_server_error : public network_error
+{
+ public:
+ network_server_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : network_error(__arg,l,f,t) {}
+};
+
+class CONNECTION_SOCKET;
+
+class network_client_error : public network_error
+{
+ public:
+ CONNECTION_SOCKET *con;
+
+ network_client_error(const std::string& __arg,CONNECTION_SOCKET *c, const int l, const char* f, const char* t)
+ : network_error(__arg,l,f,t), con(c) {}
+};
+
+class database_error : public runtime_error_src
+{
+ public:
+ database_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : runtime_error_src(__arg,l,f,t) {}
+};
+
+class database_query_error : public database_error
+{
+ public:
+ database_query_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : database_error(__arg,l,f,t) {}
+};
+
+class signal_error : public runtime_error_src
+{
+ public:
+ signal_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : runtime_error_src(__arg,l,f,t) {}
+};
+
+class pipestream_error : public runtime_error_src
+{
+ public:
+ pipestream_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : runtime_error_src(__arg,l,f,t) {}
+};
+
+class insocketstream_error : public runtime_error_src
+{
+ public:
+ insocketstream_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : runtime_error_src(__arg,l,f,t) {}
+};
+
+class variable_data_error : public runtime_error_src
+{
+ public:
+ variable_data_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : runtime_error_src(__arg,l,f,t) {}
+};
+
+class variable_range_error : public variable_data_error
+{
+ public:
+ variable_range_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : variable_data_error(__arg,l,f,t) {}
+};
+
+class variable_double_error : public variable_data_error
+{
+ public:
+ variable_double_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : variable_data_error(__arg,l,f,t) {}
+};
+
+class variable_ip_error : public variable_data_error
+{
+ public:
+ variable_ip_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : variable_data_error(__arg,l,f,t) {}
+};
+
+class variable_integrity_error : public variable_data_error
+{
+ public:
+ variable_integrity_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : variable_data_error(__arg,l,f,t) {}
+};
+
+class variable_instance_error : public variable_data_error
+{
+ public:
+ variable_instance_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : variable_data_error(__arg,l,f,t) {}
+};
+
+class variable_child_error : public variable_data_error
+{
+ public:
+ variable_child_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : variable_data_error(__arg,l,f,t) {}
+};
+
+class variable_notfound_error : public variable_data_error
+{
+ public:
+ variable_notfound_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : variable_data_error(__arg,l,f,t) {}
+};
+
+class autoupdate_error : public runtime_error_src
+{
+ public:
+ autoupdate_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : runtime_error_src(__arg,l,f,t) {}
+};
+
+class scheduler_dir_error : public runtime_error_src
+{
+ public:
+ scheduler_dir_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : runtime_error_src(__arg,l,f,t) {}
+};
+
+class scheduler_prog_error : public runtime_error_src
+{
+ public:
+ scheduler_prog_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : runtime_error_src(__arg,l,f,t) {}
+};
+
+class logic_error_src : public std::logic_error, public source_info_exception
+{
+ public:
+ logic_error_src(const std::string& __arg,const int l, const char* f, const char* t)
+ : logic_error(__arg), source_info_exception(l,f,t) {}
+};
+
+class argument_error : public logic_error_src
+{
+ public:
+ argument_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : logic_error_src(__arg,l,f,t) {}
+};
+
+class message_error : public logic_error_src
+{
+ public:
+ message_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : logic_error_src(__arg,l,f,t) {}
+};
+
+class variable_error : public logic_error_src
+{
+ public:
+ variable_error(const std::string& __arg,const int l, const char* f, const char* t)
+ : logic_error_src(__arg,l,f,t) {}
+};
+
+#endif