Skip to content
Snippets Groups Projects
Commit d19e41b9 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Merge branch 'minor-fix-to-incidentsvc' into 'master'

minor fixes to exception reports in IncidentSvc

See merge request !291
parents c250ab50 851d00f7
Branches
Tags
1 merge request!291minor fixes to exception reports in IncidentSvc
Pipeline #
...@@ -215,19 +215,19 @@ void IncidentSvc::i_fireIncident( const Incident& incident , ...@@ -215,19 +215,19 @@ void IncidentSvc::i_fireIncident( const Incident& incident ,
} }
catch( const GaudiException& exc ) { catch( const GaudiException& exc ) {
error() << "Exception with tag=" << exc.tag() << " is caught" error() << "Exception with tag=" << exc.tag() << " is caught"
" handling incident" << m_currentIncidentType << endmsg; " handling incident " << *m_currentIncidentType << endmsg;
error() << exc << endmsg; error() << exc << endmsg;
if ( listener.rethrow ) { throw exc; } if ( listener.rethrow ) { throw exc; }
} }
catch( const std::exception& exc ) { catch( const std::exception& exc ) {
error() << "Standard std::exception is caught" error() << "Standard std::exception is caught"
" handling incident" << m_currentIncidentType << endmsg; " handling incident " << *m_currentIncidentType << endmsg;
error() << exc.what() << endmsg; error() << exc.what() << endmsg;
if ( listener.rethrow ) { throw exc; } if ( listener.rethrow ) { throw exc; }
} }
catch(...) { catch(...) {
error() << "UNKNOWN Exception is caught" error() << "UNKNOWN Exception is caught"
" handling incident" << m_currentIncidentType << endmsg; " handling incident " << *m_currentIncidentType << endmsg;
if ( listener.rethrow ) { throw; } if ( listener.rethrow ) { throw; }
} }
// check wheter one of the listeners is singleShot // check wheter one of the listeners is singleShot
...@@ -258,7 +258,7 @@ void IncidentSvc::fireIncident( const Incident& incident ) ...@@ -258,7 +258,7 @@ void IncidentSvc::fireIncident( const Incident& incident )
// ============================================================================ // ============================================================================
void IncidentSvc::fireIncident( std::unique_ptr<Incident> incident ) void IncidentSvc::fireIncident( std::unique_ptr<Incident> incident )
{ {
DEBMSG<<"Async incident '"<<incident->type()<<"' fired on context "<<incident->context()<<endmsg; DEBMSG<<"Async incident '"<<incident->type()<<"' fired on context "<<incident->context()<<endmsg;
auto ctx=incident->context(); auto ctx=incident->context();
auto res=m_firedIncidents.insert(std::make_pair(ctx,IncQueue_t())); auto res=m_firedIncidents.insert(std::make_pair(ctx,IncQueue_t()));
...@@ -293,13 +293,13 @@ IIncidentSvc::IncidentPack IncidentSvc::getIncidents(const EventContext* ctx){ ...@@ -293,13 +293,13 @@ IIncidentSvc::IncidentPack IncidentSvc::getIncidents(const EventContext* ctx){
auto incs=m_firedIncidents.find(*ctx); auto incs=m_firedIncidents.find(*ctx);
if(incs!=m_firedIncidents.end()){ if(incs!=m_firedIncidents.end()){
Incident* inc(0); Incident* inc(0);
DEBMSG<<"Collecting listeners fired on context "<<*ctx<<endmsg; DEBMSG << "Collecting listeners fired on context " << *ctx << endmsg;
while(incs->second.try_pop(inc)){ while(incs->second.try_pop(inc)){
std::vector<IIncidentListener*> ls; std::vector<IIncidentListener*> ls;
getListeners(ls,inc->type()); getListeners(ls,inc->type());
p.incidents.emplace_back(std::move(inc)); p.incidents.emplace_back(std::move(inc));
p.listeners.emplace_back(std::move(ls)); p.listeners.emplace_back(std::move(ls));
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment