-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Use ArgumentOutOfRangeException.Throw helpers in more places #79460
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
Conversation
|
Tagging subscribers to this area: @dotnet/area-meta Issue DetailsI ran the new analyzer and auto-fixed all the occurrences. However, the analyzer is also conservative and won't flag throws that are using a customized message, so I also searched for some messages known to not provide any additional useful information and replaced those call sites. There are still more cases that can be evaluated subsequently.
|
07f73d0 to
bd9e4a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful diff
src/libraries/System.Private.CoreLib/src/System/Collections/Generic/HashSet.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/IO/UnmanagedMemoryAccessor.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Globalization/JulianCalendar.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Security.Principal.Windows/src/Resources/Strings.resx
Show resolved
Hide resolved
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
|
/azp list |
|
/azp run runtime-libraries-coreclr outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
I ran the new analyzer and auto-fixed all the occurrences.
However, the analyzer is also conservative and won't flag throws that are using a customized message, so I also searched for some messages known to not provide any additional useful information and replaced those call sites.
There are still more cases that can be evaluated subsequently.