Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/appfwk/detail/DAQModule.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ make_module(std::string const& plugin_name, std::string const& instance_name)
try {
mod_ptr = bpf.makePlugin<std::shared_ptr<DAQModule>>(plugin_name, instance_name);
} catch (const cet::exception& cexpt) {
ers::error(DAQModuleCreationFailed(ERS_HERE, plugin_name, instance_name, cexpt));
throw DAQModuleCreationFailed(ERS_HERE, plugin_name, instance_name, cexpt);
}
return mod_ptr;
Expand Down
11 changes: 8 additions & 3 deletions unittest/DAQModule_test.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,14 @@ BOOST_AUTO_TEST_CASE(Commands)

BOOST_AUTO_TEST_CASE(MakeModule)
{
BOOST_REQUIRE_EXCEPTION(make_module("not_a_real_plugin_name", "error_test"),
DAQModuleCreationFailed,
[&](DAQModuleCreationFailed) { return true; });
BOOST_REQUIRE_EXCEPTION(
make_module("not_a_valid_plugin_name", "error_test"), DAQModuleCreationFailed, [&](DAQModuleCreationFailed e) {
return e.cause()->message().find("contains an illegal underscore") != std::string::npos;
});
BOOST_REQUIRE_EXCEPTION(
make_module("not-a-real-plugin-name", "error_test"), DAQModuleCreationFailed, [&](DAQModuleCreationFailed e) {
return e.cause()->message().find("does not correspond to any library") != std::string::npos;
});
}

BOOST_AUTO_TEST_CASE(RegisterCommand)
Expand Down
Loading