Loading src/Client.cpp +23 −8 Original line number Diff line number Diff line Loading @@ -54,6 +54,8 @@ void Client::start() { DEBUG_STREAM << "Client::start()" << endl; try { m_dBManager_sp->connectAll(); m_protocolManager_sp = ProtocolManager::create(m_dataImporter_p, Loading @@ -67,6 +69,19 @@ void Client::start() Client::startUpdateLists(); } catch(std::exception& ex) { writeState(Tango::ALARM); std::stringstream error_stream; error_stream << "Client::start() " << ex.what() << std::endl; writeStatus(error_stream.str()); } catch(...) { writeState(Tango::ALARM); writeStatus("Client::start() unknown error"); } } //============================================================================== // Client::stop() Loading Loading @@ -363,7 +378,7 @@ void Client::handleReadResponseBody(const boost::system::error_code& errorCode) onTransferFailed(); } catch(std::runtime_error& ec) catch(std::exception& ec) { ERROR_STREAM << "Client::handleReadResponseBody() " << ec.what() << endl; Loading src/DataImporter.cpp +4 −34 Original line number Diff line number Diff line Loading @@ -716,23 +716,8 @@ void DataImporter::on() DEBUG_STREAM << "DataImporter::On() - " << device_name << endl; /*----- PROTECTED REGION ID(DataImporter::on) ENABLED START -----*/ try { if(m_client_sp) m_client_sp->start(); } catch(std::exception& ex) { set_state(Tango::ALARM); std::stringstream error_stream; error_stream << "DataImporter::On() " << ex.what() << std::endl; set_status(error_stream.str()); } catch(...) { set_state(Tango::ALARM); set_status("DataImporter::On() unknown error"); } /*----- PROTECTED REGION END -----*/ // DataImporter::on } Loading @@ -748,23 +733,8 @@ void DataImporter::off() DEBUG_STREAM << "DataImporter::Off() - " << device_name << endl; /*----- PROTECTED REGION ID(DataImporter::off) ENABLED START -----*/ try { if(m_client_sp) m_client_sp->stop(); } catch(std::exception& ex) { set_state(Tango::ALARM); std::stringstream error_stream; error_stream << "DataImporter::Off() " << ex.what() << std::endl; set_status(error_stream.str()); } catch(...) { set_state(Tango::ALARM); set_status("DataImporter::Off() unknown error"); } /*----- PROTECTED REGION END -----*/ // DataImporter::off } Loading src/DataImporter.h +0 −1 Original line number Diff line number Diff line Loading @@ -269,7 +269,6 @@ public: //------------------------------------------------------------------------------ // [Public] Counters methods //------------------------------------------------------------------------------ virtual void incrementRegularCounter(); virtual void incrementFailedCounter(); Loading src/PlainClient.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ void PlainClient::startWriteRequest() boost::bind(&PlainClient::handleWriteRequest, this, boost::asio::placeholders::error)); } catch(std::runtime_error& ec) catch(std::exception& ec) { ERROR_STREAM << "PlainClient::startWriteRequest() " << ec.what() << endl; Loading src/ProtocolManager.cpp +34 −27 Original line number Diff line number Diff line Loading @@ -241,6 +241,8 @@ void ProtocolManager::setCurrentFileDownloaded(FileWrapper::SP fileWrapper_sp) auxTransaction_sp->commit(); mainTransaction_sp->commit(); m_dataImporter_p->incrementRegularCounter(); } else if(m_failedFileRowset_sp && m_failedFileRowsetIt != m_failedFileRowset_sp->end()) Loading @@ -264,6 +266,9 @@ void ProtocolManager::setCurrentFileDownloaded(FileWrapper::SP fileWrapper_sp) auxTransaction_sp->commit(); mainTransaction_sp->commit(); m_dataImporter_p->decrementFailedCounter(); m_dataImporter_p->incrementRegularCounter(); } else { Loading Loading @@ -322,6 +327,8 @@ void ProtocolManager::setCurrentFileFailed() throw(std::runtime_error) auxTransaction_sp->commit(); mainTransaction_sp->commit(); m_dataImporter_p->incrementFailedCounter(); } else if(m_failedFileRowset_sp && m_failedFileRowsetIt != m_failedFileRowset_sp->end()) Loading Loading
src/Client.cpp +23 −8 Original line number Diff line number Diff line Loading @@ -54,6 +54,8 @@ void Client::start() { DEBUG_STREAM << "Client::start()" << endl; try { m_dBManager_sp->connectAll(); m_protocolManager_sp = ProtocolManager::create(m_dataImporter_p, Loading @@ -67,6 +69,19 @@ void Client::start() Client::startUpdateLists(); } catch(std::exception& ex) { writeState(Tango::ALARM); std::stringstream error_stream; error_stream << "Client::start() " << ex.what() << std::endl; writeStatus(error_stream.str()); } catch(...) { writeState(Tango::ALARM); writeStatus("Client::start() unknown error"); } } //============================================================================== // Client::stop() Loading Loading @@ -363,7 +378,7 @@ void Client::handleReadResponseBody(const boost::system::error_code& errorCode) onTransferFailed(); } catch(std::runtime_error& ec) catch(std::exception& ec) { ERROR_STREAM << "Client::handleReadResponseBody() " << ec.what() << endl; Loading
src/DataImporter.cpp +4 −34 Original line number Diff line number Diff line Loading @@ -716,23 +716,8 @@ void DataImporter::on() DEBUG_STREAM << "DataImporter::On() - " << device_name << endl; /*----- PROTECTED REGION ID(DataImporter::on) ENABLED START -----*/ try { if(m_client_sp) m_client_sp->start(); } catch(std::exception& ex) { set_state(Tango::ALARM); std::stringstream error_stream; error_stream << "DataImporter::On() " << ex.what() << std::endl; set_status(error_stream.str()); } catch(...) { set_state(Tango::ALARM); set_status("DataImporter::On() unknown error"); } /*----- PROTECTED REGION END -----*/ // DataImporter::on } Loading @@ -748,23 +733,8 @@ void DataImporter::off() DEBUG_STREAM << "DataImporter::Off() - " << device_name << endl; /*----- PROTECTED REGION ID(DataImporter::off) ENABLED START -----*/ try { if(m_client_sp) m_client_sp->stop(); } catch(std::exception& ex) { set_state(Tango::ALARM); std::stringstream error_stream; error_stream << "DataImporter::Off() " << ex.what() << std::endl; set_status(error_stream.str()); } catch(...) { set_state(Tango::ALARM); set_status("DataImporter::Off() unknown error"); } /*----- PROTECTED REGION END -----*/ // DataImporter::off } Loading
src/DataImporter.h +0 −1 Original line number Diff line number Diff line Loading @@ -269,7 +269,6 @@ public: //------------------------------------------------------------------------------ // [Public] Counters methods //------------------------------------------------------------------------------ virtual void incrementRegularCounter(); virtual void incrementFailedCounter(); Loading
src/PlainClient.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ void PlainClient::startWriteRequest() boost::bind(&PlainClient::handleWriteRequest, this, boost::asio::placeholders::error)); } catch(std::runtime_error& ec) catch(std::exception& ec) { ERROR_STREAM << "PlainClient::startWriteRequest() " << ec.what() << endl; Loading
src/ProtocolManager.cpp +34 −27 Original line number Diff line number Diff line Loading @@ -241,6 +241,8 @@ void ProtocolManager::setCurrentFileDownloaded(FileWrapper::SP fileWrapper_sp) auxTransaction_sp->commit(); mainTransaction_sp->commit(); m_dataImporter_p->incrementRegularCounter(); } else if(m_failedFileRowset_sp && m_failedFileRowsetIt != m_failedFileRowset_sp->end()) Loading @@ -264,6 +266,9 @@ void ProtocolManager::setCurrentFileDownloaded(FileWrapper::SP fileWrapper_sp) auxTransaction_sp->commit(); mainTransaction_sp->commit(); m_dataImporter_p->decrementFailedCounter(); m_dataImporter_p->incrementRegularCounter(); } else { Loading Loading @@ -322,6 +327,8 @@ void ProtocolManager::setCurrentFileFailed() throw(std::runtime_error) auxTransaction_sp->commit(); mainTransaction_sp->commit(); m_dataImporter_p->incrementFailedCounter(); } else if(m_failedFileRowset_sp && m_failedFileRowsetIt != m_failedFileRowset_sp->end()) Loading