Skip to content
Snippets Groups Projects
Commit ef78b654 authored by Reiner Hauser's avatar Reiner Hauser
Browse files

new exception to catch situation where invalid IS server name is given

parent 657f116d
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,14 @@ namespace daq {
ERS_EMPTY,
ERS_EMPTY)
ERS_DECLARE_ISSUE_BASE(asyncmsg,
InvalidISServer,
Issue,
"Cannot publish because of invalid IS server: " << m_server,
ERS_EMPTY,
((std::string)m_server)
)
ERS_DECLARE_ISSUE_BASE(asyncmsg,
CannotResolve,
Issue,
......
......@@ -109,9 +109,16 @@ namespace daq {
ISInfoDictionary d(m_partition);
ISServerIterator servers(m_partition, m_is_server + ".*");
if(servers.entries() == 0) {
throw InvalidISServer(ERS_HERE,m_is_server);
}
while(servers++) {
// may throw
d.checkin(std::string(servers.name()) + ".MSG_" + name, info);
try {
d.checkin(std::string(servers.name()) + ".MSG_" + name, info);
} catch(ers::Issue& reason) {
throw InvalidISServer(ERS_HERE, servers.name(), reason);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment