Bug #25077
gallery::Event::getByLabel() throws an exception on empty input tag
Scope:
Internal
Experiment:
-
SSI Package:
gallery
Description
What happens: gallery::Event::getByLabel(art::InputTag{}, handle)
throws a art::errors::LogicError
exception.
What should happen: gallery::Event::getByLabel(art::InputTag{}, handle)
returns false
.
The issue here is that `gallery::Event::getByLabel()` behaves differently from `art::Event::getByLabel()`, making it harder to write generic code.
The simplest workaround is to add an early check in gallery::Event::getByLabel()
, something like
if (inputTag.empty()) {
result = Handle<PROD>{makeProductNotFoundException(typeid(PROD), inputTag)};
return false;
}
History
#1 Updated by Kyle Knoepfel 4 months ago
- Status changed from New to Accepted
#2 Updated by Kyle Knoepfel 4 months ago
- % Done changed from 0 to 100
- Assignee set to Kyle Knoepfel
- Status changed from Accepted to Resolved
#3 Updated by Kyle Knoepfel 4 months ago
- Target version set to 1.14.03
#4 Updated by Kyle Knoepfel 4 months ago
- Status changed from Resolved to Closed