+disconnected::disconnected(const char *file_, int line_, const char *func_,
+ const std::string& instance, const in_port_t port,
+ const char *format, ...) :
+ exception(file_, line_, func_),
+ _port(port)
+{
+ va_list args;
+ va_start(args, format);
+ char last_error[BUFSIZ];
+ (void)vsnprintf(last_error, sizeof(last_error), format, args);
+ va_end(args);
+
+ snprintf(_error_message, sizeof(_error_message), "%s:%u %s", instance.c_str(), uint32_t(port), last_error);
+}
+
+start::start(const char *file_, int line_, const char *func_,
+ const std::string& instance, const in_port_t port,
+ const char *format, ...) :
+ exception(file_, line_, func_),
+ _port(port)
+{
+ va_list args;
+ va_start(args, format);
+ char last_error[BUFSIZ];
+ (void)vsnprintf(last_error, sizeof(last_error), format, args);
+ va_end(args);
+
+ snprintf(_error_message, sizeof(_error_message), "%s:%u %s", instance.c_str(), uint32_t(port), last_error);
+}
+