diff options
author | Stephen Toub <stoub@microsoft.com> | 2016-01-14 00:09:00 -0500 |
---|---|---|
committer | Stephen Toub <stoub@microsoft.com> | 2016-01-14 00:09:00 -0500 |
commit | 3e46941ac53c6c88723dee9abc9b1f213ca817a1 (patch) | |
tree | 66196121d8c21857f1dc36517f4b4c68e701a2e9 /src | |
parent | eba9dab8b699e54ba806253e35cc24540a27e16d (diff) | |
parent | c3b5d9a1792b66c969c00cf18933330d38788c33 (diff) | |
download | coreclr-3e46941ac53c6c88723dee9abc9b1f213ca817a1.tar.gz coreclr-3e46941ac53c6c88723dee9abc9b1f213ca817a1.tar.bz2 coreclr-3e46941ac53c6c88723dee9abc9b1f213ca817a1.zip |
Merge pull request #2646 from stephentoub/list_exceptionnames
Fix incorrect ArgumentException names in List<T>
Diffstat (limited to 'src')
-rw-r--r-- | src/mscorlib/src/System/Collections/Generic/List.cs | 4 | ||||
-rw-r--r-- | src/mscorlib/src/System/ThrowHelper.cs | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/mscorlib/src/System/Collections/Generic/List.cs b/src/mscorlib/src/System/Collections/Generic/List.cs index 8572dabca1..b7d261a080 100644 --- a/src/mscorlib/src/System/Collections/Generic/List.cs +++ b/src/mscorlib/src/System/Collections/Generic/List.cs @@ -539,7 +539,7 @@ namespace System.Collections.Generic { public void ForEach(Action<T> action) { if( action == null) { - ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match); + ThrowHelper.ThrowArgumentNullException(ExceptionArgument.action); } Contract.EndContractBlock(); @@ -991,7 +991,7 @@ namespace System.Collections.Generic { public void Sort(Comparison<T> comparison) { if( comparison == null) { - ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match); + ThrowHelper.ThrowArgumentNullException(ExceptionArgument.comparison); } Contract.EndContractBlock(); diff --git a/src/mscorlib/src/System/ThrowHelper.cs b/src/mscorlib/src/System/ThrowHelper.cs index b050dbc4a7..1fbce9abe0 100644 --- a/src/mscorlib/src/System/ThrowHelper.cs +++ b/src/mscorlib/src/System/ThrowHelper.cs @@ -128,6 +128,10 @@ namespace System { string argumentName = null; switch (argument) { + case ExceptionArgument.action: + argumentName = "action"; + break; + case ExceptionArgument.array: argumentName = "array"; break; @@ -144,6 +148,10 @@ namespace System { argumentName = "collection"; break; + case ExceptionArgument.comparison: + argumentName = "comparison"; + break; + case ExceptionArgument.list: argumentName = "list"; break; @@ -463,6 +471,8 @@ namespace System { options, view, sourceBytesToCopy, + action, + comparison } // |