Skip to content

Property: Catch all parsing errors

Frank Winklmeier requested to merge fwinkl/Gaudi:spirit_exception into master

Property::fromString was only catching std::invalid_argument exceptions. However, there can be other exceptions thrown by the parser (e.g. from boost::spirit) that were not being filtered. As those exceptions were only caught higher up they lead to very unhelpful error messages. Change the code to catch all std::exceptions. In addition:

  • Re-throw the exception as Gaudi::Exception.
  • Improve the diagnostics to contain the property name and owner type.
  • Add "WARNING/FATAL" keywords to the stderr message.
  • Add test case to PropertyAlg.

Relevant ATLAS issue: https://its.cern.ch/jira/browse/ATR-22494 (thanks to @rbielski)

Merge request reports