Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support for not wrapping exceptions with TargetInvocationException. #13767
There is at least one outstanding issue that might make it a bad idea to merge this pull request immediately: dotnet/corert#4437 already added the new BindingFlags value to the shared System.Private.CoreLib code. I'm not sure what effect adding it this pull request will have. If it causes a problem, I will rebase once that change is merged.
Additionally, there are a couple of there things I'm not sure are correct about this pull requests:
Thanks for picking this up, @AustinWise! I'll start looking at the change in more detail but some immediate answers to your questions:
As long as you picked up the exact change (including whitespaces), there shouldn't be any problem. There'll be an automated PR that brings BindingFlags.cs over from corert in the next few days - if the change has already been made in CoreCLR by then, it'll just be a null commit for that PR.
They belong in corefx, but as it happens, I've already written tests for this feature that I was planning to PR this week since I wanted test coverage for corert and didn't know how long the coreclr side would remain up for grabs. (You can see a preview here: https://github.com/AtsushiKan/corefx/blob/sig-wip/src/System.Runtime/tests/System/Reflection/BindingFlagsDoNotPass.netcoreapp.cs). So you needn't worry about that.
I updated this PR in response to the feedback by changing the "wrapExceptions" parameter to be consistently positive. I also removed the units tests in deference to the future unit tests in CoreFX.
@AtsushiKan In looking at your tests, they cover most code paths, but there are a couple