Skip to content
Snippets Groups Projects

Property: Catch all parsing errors

Merged 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

Pipeline #2170879 passed

Pipeline passed for e6b3006a on fwinkl:spirit_exception

Approved by

Merged by Marco ClemencicMarco Clemencic 4 years ago (Jan 11, 2021 3:16pm UTC)

Merge details

  • Changes merged into master with 01c1071a.
  • Deleted the source branch.

Pipeline #2223085 passed

Pipeline passed for 01c1071a on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading