DUNE-DAQ / DUNE-DAQ/logging

[Bug]: Throwing an ERS exception type and not catching it results in no message printed

Open
#45 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
0
Forks
0
Avg merge
30m
Merged PRs (30d)
1

Description

Description

Did not see full message output from throw when not caught. Had to add a ers::error to see the message.

Steps to reproduce

While developing a DAQModule, I forgot the DEFINE_DUNE_DAQ_MODULE call in the cpp file. The unit test calls appfwk::make_module without a try..catch block. When I run the test, I see this:

2026-Jun-26 13:19:00,732 LOG [dunedaq::DataflowStatusModule_test::Constructor::test_method(...) at /home/eflumerf/Desktop/dune-daq-base/dev-dfoprotocol-260624/sourcecode/dfmodules/unittest/DataflowStatusModule_test.cxx:151] Test case Constructor BEGIN
unknown location(0): fatal error: in "DataflowStatusModule_test/Constructor": dunedaq::appfwk::DAQModuleCreationFailed: Failed to create DAQModule test of type DataflowStatusModule

If I add an ers::error before the throw, I see much more information:

2026-Jun-26 13:24:29,932 LOG [dunedaq::DataflowStatusModule_test::Constructor::test_method(...) at /home/eflumerf/Desktop/dune-daq-base/dev-dfoprotocol-260624/sourcecode/dfmodules/unittest/DataflowStatusModule_test.cxx:151] Test case Constructor BEGIN
2026-Jun-26 13:24:29,978 ERROR [dunedaq::appfwk::make_module(...) at /home/eflumerf/Desktop/dune-daq-base/dev-dfoprotocol-260624/sourcecode/appfwk/include/appfwk/detail/DAQModule.hxx:48] Failed to create DAQModule test of type DataflowStatusModule
        was caused by: 2026-Jun-26 13:24:29,978 ERROR [ers::Issue::Issue(...) at /tmp/root/spack-stage/spack-stage-ers-NB_DEV_260624_A9-67mi2pnty2odfjiryrqn5qf5z7xziq3p/spack-src/src/Issue.cpp:102] ---- Configuration BEGIN
  UnknownPlugin
  ---- Configuration BEGIN
    Unable to load requested symbol make from library /home/eflumerf/Desktop/dune-daq-base/dev-dfoprotocol-260624/install/dfmodules/lib64/libdfmodules_DataflowStatusModule_duneDAQModule.so
    /home/eflumerf/Desktop/dune-daq-base/dev-dfoprotocol-260624/install/dfmodules/lib64/libdfmodules_DataflowStatusModule_duneDAQModule.so: undefined symbol: make
  ---- Configuration END
  Plugin DataflowStatusModule with version Unknown was not registered.
  Perhaps your plugin type is misspelled or is not a plugin recognized by this
  system.
---- Configuration END

unknown location(0): fatal error: in "DataflowStatusModule_test/Constructor": dunedaq::appfwk::DAQModuleCreationFailed: Failed to create DAQModule test of type DataflowStatusModule
Version and environment

NFD_DEV_260626_A9

Impact

Small/Isolated

Anything else?

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at appfwk/detail/DAQModule.hxx:48, where make_module reports the DAQModuleCreationFailed exception, and reproduce the failure from DataflowStatusModule_test.cxx:151 without a try/catch block. Compare the uncaught output with the ers::error output; done means the uncaught exception preserves the detailed underlying error message.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.