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 to #20612 - Throw helpful translation exception for String.Equals(String, StringComparison) #20663

Merged
merged 1 commit into from
May 13, 2020

Conversation

maumar
Copy link
Contributor

@maumar maumar commented Apr 16, 2020

Adding state to ExpressionTranslatingExpressionVisitor that stores the information about why translation failed. The information is bubbled up and added to the "translation failed" exception.
Currently only doing this for string.Equals and non-mapped member properties

Copy link
Member

@smitpatel smitpatel left a comment

Choose a reason for hiding this comment

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

Add a test where both the errors are happening in same expression so we see results of concatenation.
Also paste output of each error and combination in PR so we can see what exactly user will see.

@maumar
Copy link
Contributor Author

maumar commented Apr 27, 2020

@smitpatel new version up

@maumar maumar force-pushed the better_exceptions branch 2 times, most recently from 93acd74 to 326b684 Compare April 27, 2020 23:57
@maumar
Copy link
Contributor Author

maumar commented May 7, 2020

ping

@smitpatel
Copy link
Member

Rebase?

@maumar
Copy link
Contributor Author

maumar commented May 7, 2020

@smitpatel done

@JeremyLikness
Copy link
Member

@maumar here is a fwlink instead of aka.ms format (thanks @smitpatel) https://go.microsoft.com/fwlink/?linkid=2129535

@maumar
Copy link
Contributor Author

maumar commented May 12, 2020

ready again @smitpatel

@smitpatel
Copy link
Member

Also add member not mapped for indexer properties.

…(String, StringComparison)

Adding state to ExpressionTranslatingExpressionVisitor that stores the information about why translation failed. The information is bubbled up and added to the "translation failed" exception.
Currently only doing this for string.Equals and non-mapped member properties
@maumar maumar merged commit 9e0f05b into master May 13, 2020
@maumar maumar deleted the better_exceptions branch May 13, 2020 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Throw helpful translation exception for String.Equals(String, StringComparison)
5 participants