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

TauWPThreshold.h uses exception throws as flow control #43492

Open
wddgit opened this issue Dec 4, 2023 · 7 comments
Open

TauWPThreshold.h uses exception throws as flow control #43492

wddgit opened this issue Dec 4, 2023 · 7 comments

Comments

@wddgit
Copy link
Contributor

wddgit commented Dec 4, 2023

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.

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 4, 2023

A new Issue was created by @wddgit W. David Dagenhart.

@makortel, @rappoccio, @sextonkennedy, @smuzaffar, @antoniovilela, @Dr15Jones can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@makortel
Copy link
Contributor

makortel commented Dec 4, 2023

assign RecoTauTag/RecoTau

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 4, 2023

New categories assigned: reconstruction

@jfernan2,@mandrenguyen you have been requested to review this Pull request/Issue and eventually sign? Thanks

@makortel
Copy link
Contributor

makortel commented Dec 4, 2023

@cms-sw/tau-pog-l2

@makortel
Copy link
Contributor

makortel commented Dec 4, 2023

E.g. std::from_chars() provides a way to do string-to-number conversion without exceptions, while also recognizing parsing failures.

@mandrenguyen
Copy link
Contributor

+reconstruction
Addressed by #43890
Thanks @mbluj !

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 8, 2024

This issue is fully signed and ready to be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants