Feature #12574
Have exceptions from get() report the full configuration key
0%
Description
The methods fhicl::ParameterSet::get(std::string key)
throw an exception when key
is not found.
The message in the exception precisely reports key
.
This makes configuration errors in art
context harder to interpret, since the exact context needs to be pulled together from different parts of the exception chain.
With FHiCL source information now available, it might be possible to render more friendly messages reporting the full key.
For example, physics.producers.myModule.algo1.radius
instead of just radius
.
I attach a simple example showing the problem. Its second exception is the one I would like to be more informative.
History
#1 Updated by Kyle Knoepfel almost 5 years ago
- Status changed from New to Feedback
The ParameterSet
that is throwing the exception does not have the information re. the nesting. We have tried to report useful context whenever an exception is thrown. However, if there are specific cases where these can be improved, we would like to know. Note that if configuration validation is used, the information you request is readily available, even when an exception is thrown.
Please let us know if the ParameterSet
validation does not meet your needs.
#2 Updated by Gianluca Petrillo almost 5 years ago
I suspect that, in the case I have in my hands, parameter validation is not an option.
The "might" in my report was meant as "it might or it might not", and now I learn it's the latter.
Feel free to mark the feature request as rejected.
We'll just have the service intercept these exceptions, which is fully acceptable.
#3 Updated by Kyle Knoepfel almost 5 years ago
- Status changed from Feedback to Rejected
Rejected per user request.