Removing additional exception information for better clarity #392
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have been trying to help @tklemenz with debugging a qc workflow. There is an unhandled exception
which I wanted to understand. Since there is no further name string in the exception message my first assumption was that the methods are called with an empty string. But then I found that the implementation of of
AliceO2::Common::ObjectNotFoundError
drops additional information and for clarity we better skip writing more details into the exception until this is fixed.https://github.com/AliceO2Group/Common/blob/3f92059e08f191ce6c65a5a9a119e5aba02b89ec/include/Common/Exceptions.h#L28
We can also take this suggestion as a trigger to fix the implementation in AliceO2/Common and maybe even add a sanity check for the arguments in
stopPublishing
/getMonitoObject
to make the exception message more usable.Last but not least, I suggest to handle the exception on the level of the QC framework, and only rethrow with additional information if the condition is really fatal.