Lift try..catch out of an expression and replace with a temporary variable#34912
Open
ChrisJollyAU wants to merge 1 commit intodotnet:mainfrom
Open
Lift try..catch out of an expression and replace with a temporary variable#34912ChrisJollyAU wants to merge 1 commit intodotnet:mainfrom
ChrisJollyAU wants to merge 1 commit intodotnet:mainfrom
Conversation
Member
|
@ChrisJollyAU thanks for submitting this - this is generally a non-trivial part of EF. Just to set expectations, it will probably be quite a while before we're able to review this - we're currently heads-down in 9.0 stabilization, docs and various other activities... But we definitely plan to do substantial work on (and hopefully finalize) the NativeAOT support in 10, and this would be part of that. |
249ae47 to
6b86657
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When
EnableDetailedErrorsis turned on it wraps the expression to read the field value in a try...catch statementIn certain situations this is not valid C#
NewExpressionAlso fixed some of the catch handling
ThrowExtractJsonPropertyExceptionneeds to be public for it to be called (likeThrowReadValueExceptionalready is)property.Namerather than justpropertypropertyis null so handle that for the call toThrowReadValueExceptionas wellFixes #34393