AIDASoft / podio

PODIO
GNU General Public License v3.0
24 stars 60 forks source link

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

Closed jmcarcell closed 11 months ago

jmcarcell commented 11 months ago

BEGINRELEASENOTES

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).