Skip to content

TauWPThreshold.h uses exception throws as flow control #43492

Open
@wddgit

Description

@wddgit

When debugging a problem in the addOn PR tests, I was trying use catch throw. I hit a throw from this line of code 17 times in a row and gave up trying to simply continue past it. I had to set an explicit breakpoint after this constructor to get past this troublesome line of code.

https://cmssdt.cern.ch/dxr/CMSSW/source/RecoTauTag/RecoTau/interface/TauWPThreshold.h?from=TauWPThreshold&case=true#17

I didn't spend a lot of time studying this, but at first glance it does not look like a truly exceptional circumstance (possibly I am incorrect and there is some kind of bug here).

It would make debugging exceptions with catch throw much easier if we didn't have this behavior going on. I would suggestion replacing this with some other control structure that does not use try-catch.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions