+};
+
+class disconnected : public exception
+{
+public:
+ disconnected(const char *file, int line, const char *func, const std::string&, const in_port_t port, const char *format, ...);
+
+ const char* what() const throw()
+ {
+ return _error_message;
+ }
+
+ // The following are just for unittesting the exception class
+ static bool is_disabled();
+ static void disable();
+ static void enable();
+ static uint32_t disabled_counter();
+ static void increment_disabled_counter();
+
+private:
+ in_port_t _port;
+ char _instance[1024];
+};
+
+class start : public exception
+{
+public:
+ start(const char *file, int line, const char *func, const std::string&, const in_port_t port, const char *format, ...);
+
+ const char* what() const throw()
+ {
+ return _error_message;
+ }
+
+ // The following are just for unittesting the exception class
+ static bool is_disabled();
+ static void disable();
+ static void enable();
+ static uint32_t disabled_counter();
+ static void increment_disabled_counter();
+
+private:
+ in_port_t _port;
+ char _instance[1024];