void ns_throw_exception(const ns_ex & ex){ throw ns_ex(ex.text()); }
void ns_image_server_dispatcher::handle_central_connection_error(ns_ex & ex){ if (!currently_unable_to_connect_to_the_central_db){ image_server.register_server_event_no_db(ns_image_server_event("ns_image_server_dispatcher::Lost connection to the central SQL database. (") << ex.text() << ") Waiting for the connection to be re-established..."); image_server.alert_handler.buffer_all_alerts_locally(false); currently_unable_to_connect_to_the_central_db = true; } else{ cout << "~"; image_server.alert_handler.buffer_all_alerts_locally(false); return; } }
void ns_image_server_dispatcher::handle_central_connection_error(ns_ex & ex){ if (!currently_unable_to_connect_to_the_central_db){ image_server.alert_handler.buffer_all_alerts_locally(false); currently_unable_to_connect_to_the_central_db = true; throw ns_ex("ns_image_server_dispatcher::Could not connect to central database: ") << ex.text(); } else{ cout << "~"; image_server.alert_handler.buffer_all_alerts_locally(false); return; } }