This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Clean up and prepare FileLoadException.cs for move to Shared Partition.#10764
Merged
8 commits merged intomasterfrom Apr 6, 2017
unknown repository
Merged
Clean up and prepare FileLoadException.cs for move to Shared Partition.#107648 commits merged intomasterfrom unknown repository
8 commits merged intomasterfrom
unknown repository
Conversation
added 7 commits
April 5, 2017 15:50
Avoids MissingMetadataExceptions on CoreRT. Assuming metadata exists, ToString() and FullName() still generates the same string except in the weird case where an app subclasses FileLoadException with a generic exception type - in which case, the ToString() version is actually more readable.
FusionLog is now just a normal property and an answer to a trivia question - it won't throw SecurityException.
Author
|
cc @jkotas |
jkotas
reviewed
Apr 6, 2017
| catch (SecurityException) | ||
| info.AddValue("FileLoad_FileName", FileName, typeof(string)); | ||
| string fusionLog = FusionLog; | ||
| if (fusionLog != null) |
Member
There was a problem hiding this comment.
Why to add only if it is non-null now when it was added unconditionally before? Adding it only if non-null means that there will exception thrown & caught during deserialization.
Author
There was a problem hiding this comment.
Hmm... I think I unified the "missing because of security" to "missing because of non-null or security" in the original code. Fixed.
jkotas
reviewed
Apr 6, 2017
| _fileName = info.GetString("FileLoad_FileName"); | ||
| FileName = info.GetString("FileLoad_FileName"); | ||
|
|
||
| try |
Member
There was a problem hiding this comment.
You can remove the this try/catch if you add it unconditionally.
jkotas
approved these changes
Apr 6, 2017
ghost
pushed a commit
to dotnet/corert
that referenced
this pull request
Apr 6, 2017
hadibrais
pushed a commit
to hadibrais/coreclr
that referenced
this pull request
Apr 7, 2017
…n. (dotnet#10764) * String => string * Replace fields with autoprops. * Turn Type.FullName call to Type.ToString() in ToString(). Avoids MissingMetadataExceptions on CoreRT. Assuming metadata exists, ToString() and FullName() still generates the same string except in the weird case where an app subclasses FileLoadException with a generic exception type - in which case, the ToString() version is actually more readable. * Get rid of useless try-catch around FusionLog calls. FusionLog is now just a normal property and an answer to a trivia question - it won't throw SecurityException. * Get rid of low-value SetMessageField() middleman. * Split off the stuff we don't want to share. * The complementary carwash... * Don't conditionalize FusionLog serialization.
This pull request was closed.
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.
No description provided.