Skip to content

Commit

Permalink
Only print informational message if group matches no modules if is
Browse files Browse the repository at this point in the history
GroupByType.
  • Loading branch information
eflumerf committed Aug 30, 2024
1 parent 8b1c30b commit 5b151bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/DAQModuleManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ DAQModuleManager::check_mod_has_cmd(const std::string& cmd, const std::string& m
{

if (!m_modules_by_type.count(mod_class) || m_modules_by_type[mod_class].size() == 0) {
throw ActionPlanValidationFailed(ERS_HERE, cmd, mod_class, "Module does not exist");
auto issue = ActionPlanValidationFailed(ERS_HERE, cmd, mod_class, "Module does not exist");
if (mod_id == "") {
ers::info(issue);
return;
} else {
throw issue;
}
}

auto module_test = m_module_map[m_modules_by_type[mod_class][0]];
Expand Down
4 changes: 2 additions & 2 deletions unittest/DAQModuleManager_test.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ BOOST_AUTO_TEST_CASE(InvalidActionPlan)
std::string sessionName = "test-session";
dunedaq::opmonlib::TestOpMonManager opmgr;
auto cfgMgr = std::make_shared<dunedaq::appfwk::ConfigurationManager>(oksConfig, appName, sessionName);
BOOST_REQUIRE_EXCEPTION(
mgr.initialize(cfgMgr, opmgr), ActionPlanValidationFailed, [&](ActionPlanValidationFailed) { return true; });
// This succeeds, but prints a message
mgr.initialize(cfgMgr, opmgr);

dunedaq::opmonlib::TestOpMonManager opmgr2;
dunedaq::get_iomanager()->reset();
Expand Down

0 comments on commit 5b151bd

Please sign in to comment.