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

feature: improved exception message when there are multiple resource IDs with the same name #1302

Merged
merged 2 commits into from
Mar 27, 2017

Conversation

Qonstrukt
Copy link
Member

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
This clarifies the exception you get when ControlFetcherMixin collects the names of resource ID's in your layout files. It shows you for which ID's it's exactly failing so it's easier to find which names are the culprit.

What is the current behavior? (You can also link to an open issue here)
When you have duplicate names with different casings in use as resource ID's, you get a fairly generic ArgumentException which is hard to understand without diving into the code of ControlFetcherMixin.

What is the new behavior (if this is a feature change)?
We throw a more explanatory InvalidOperationException which shows which names should be fixed to get things going.

Does this PR introduce a breaking change?
Nope, unless someone is already catching the ArgumentException themselves, but I can't imagine anyone relying on such functionality.

Please check if the PR fulfills these requirements

Other information:
As reported in #1275, and we ran into this ourselves as well. Cost multiple of our engineers a good couple of minutes to figure out what's wrong.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 66.782% when pulling efc930a on Qonstrukt:duplicate-key-exception into f766ddd on reactiveui:develop.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 66.824% when pulling 54b16c0 on Qonstrukt:duplicate-key-exception into 2379efc on reactiveui:develop.

@ghuntley ghuntley added this to the vNext milestone Mar 27, 2017
@ghuntley ghuntley merged commit 9e4c9fe into reactiveui:develop Mar 27, 2017
@ghuntley ghuntley changed the title Clarified exception when WireUpControls fails feature: improved exception message when there are multiple resource IDs with the same name Mar 27, 2017
@ghuntley
Copy link
Member

Thanks @Qonstrukt!

@Qonstrukt Qonstrukt deleted the duplicate-key-exception branch May 4, 2017 09:46
glennawatson pushed a commit that referenced this pull request Mar 23, 2019
@lock lock bot locked and limited conversation to collaborators Jun 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants