Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an error message when there is a std::bad_function_call #520

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

jmcarcell
Copy link
Member

BEGINRELEASENOTES

  • Add an error message when there is an std::bad_function_call, which currently shows
    a stacktrace and is quite uninformative.

ENDRELEASENOTES

Depending on what is found and what isn't it is possible to trigger a std::bad_function_call that will show a very uninformative traceback:

Traceback (most recent call last):
  File "/podio/install/bin/podio-dump", line 175, in <module>
    main(clargs)
  File "/podio/install/bin/podio-dump", line 130, in main
    print_frame(frames[ient], args.category, ient, args.detailed)
                ~~~~~~^^^^^^
  File "/podio/install/python/podio/frame_iterator.py", line 55, in __getitem__
    frame_data = self._reader.readEntry(self._category, entry)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cppyy.gbl.bad_function_call: unique_ptr<podio::ROOTFrameData,default_delete<podio::ROOTFrameData> > podio::ROOTFrameReader::readEntry(const string& name, const unsigned int entry) =>
    bad_function_call: bad_function_call

where the only source of information is some warnings from before from ROOT (warnings if it's missing for example the .rootmap file, errors if the .so files are missing).

Copy link
Collaborator

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This should hopefully not happen in properly installed stacks, but I think it's good to have in any case.

@tmadlener tmadlener merged commit 8e4e4ff into AIDASoft:master Dec 1, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants