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

Fix incorrect exception message #13432

Merged
merged 1 commit into from Feb 24, 2016

Conversation

wmtan
Copy link
Contributor

@wmtan wmtan commented Feb 22, 2016

There is an existing exception message designed for the case where the reuse of a process name results in a duplicate product of the same type with the same input tag.
Unfortunately, the same exception is thrown when the duplication is a result of the same product being registered more than once in the current process. In this second case, the exception message is not only misleading, but flat out wrong.
This PR distinguishes the two cases, and adds a new exception to be thrown in the second case.
This PR solves issue #13268

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @wmtan for CMSSW_8_1_X.

It involves the following packages:

DataFormats/Provenance

@cmsbuild, @smuzaffar, @Dr15Jones, @davidlange6 can you please review it and eventually sign? Thanks.
@wddgit this is something you requested to watch as well.
@slava77, @Degano, @smuzaffar you are the release manager for this.

cms-bot commands are list here #13028

@Dr15Jones
Copy link
Contributor

please test

// Duplicate registration in current process
throw Exception(errors::LogicError , "Duplicate Product")
<< "The produced product " << previous.second << " is registered more than once.\n"
<< "Please remove the redundant 'produces' call(s).\n";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the exception message contain the name of the module?

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

@Dr15Jones
Copy link
Contributor

@wmtan ping

@wmtan
Copy link
Contributor Author

wmtan commented Feb 23, 2016

@Dr15Jones
Yes, the module name is printed out in the surrounding context.

@wmtan
Copy link
Contributor Author

wmtan commented Feb 23, 2016

@Dr15Jones ping Can you sign this?

@Dr15Jones
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_8_1_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @Degano, @smuzaffar

davidlange6 added a commit that referenced this pull request Feb 24, 2016
@davidlange6 davidlange6 merged commit 70013d3 into cms-sw:CMSSW_8_1_X Feb 24, 2016
@wmtan wmtan deleted the CorrectExceptionMessage branch March 16, 2016 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants