Fix Invalid_IInputElement resource#6691
Merged
singhashish-wpf merged 4 commits intodotnet:mainfrom Jul 14, 2022
Merged
Conversation
ThomasGoulet73
commented
Jun 16, 2022
| if (!InputElement.IsValid(element)) | ||
| { | ||
| throw new ArgumentException(SR.Get(SRID.Invalid_IInputElement), "element"); | ||
| throw new ArgumentException(SR.Get(SRID.Invalid_IInputElement, element.GetType()), nameof(element)); |
Contributor
Author
There was a problem hiding this comment.
Here is an example of a call to SR.Get using Invalid_IInputElement and not passing a parameter for the format.
Here's the content of Invalid_IInputElement:
Member
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
|
This PR will be taken in the next community test pass. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Fixes a small bug in the Invalid_IInputElement resource. UIElement3D is not included in the message even if it is supported.
Fixes a small bug in some usage of the Invalid_IInputElement resource. Some usage were not passing an argument in the Get method so the format would return the message unformated.
Also added a couple of comment cleanup that did not include UIElement3D in the supported list.
Customer Impact
Give proper exception message.
Regression
No. This is probably an old "bug" when UIElement3D was introduced.
Testing
Local build + CI.
Risk
Low. Exception message could change but I don't think it is breaking
Microsoft Reviewers: Open in CodeFlow