diff options
author | Jan Kotas <jkotas@microsoft.com> | 2015-12-30 04:14:50 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2015-12-30 04:14:50 +0300 |
commit | d502d1efdd642932f256602e566d0b7786463cc4 (patch) | |
tree | 0ecfa307c474d3adce5375cd438aef6ff9fb6e39 /src/System.Private.CoreLib | |
parent | 84b4f44572da69e07325e2b09988c1727cefdbff (diff) |
Include the key in the "duplicate key" exception message
Port dotnet/coreclr#1452 to CoreRT. Also deleted redundant resource files.
Diffstat (limited to 'src/System.Private.CoreLib')
-rw-r--r-- | src/System.Private.CoreLib/src/Resources/Strings.resx | 2 | ||||
-rw-r--r-- | src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ConditionalWeakTable.cs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/System.Private.CoreLib/src/Resources/Strings.resx b/src/System.Private.CoreLib/src/Resources/Strings.resx index e59e8b811..eaaa20ef0 100644 --- a/src/System.Private.CoreLib/src/Resources/Strings.resx +++ b/src/System.Private.CoreLib/src/Resources/Strings.resx @@ -403,7 +403,7 @@ <value>The value '{0}' is not of type '{1}' and cannot be used in this generic collection.</value> </data> <data name="Argument_AddingDuplicate" xml:space="preserve"> - <value>An item with the same key has already been added.</value> + <value>An item with the same key has already been added. Key: {0}</value> </data> <data name="Argument_AddingDuplicate__" xml:space="preserve"> <value>Item has already been added. Key in dictionary: '{0}' Key being added: '{1}'</value> diff --git a/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ConditionalWeakTable.cs b/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ConditionalWeakTable.cs index 1084d720f..7976e1416 100644 --- a/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ConditionalWeakTable.cs +++ b/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ConditionalWeakTable.cs @@ -71,7 +71,7 @@ namespace System.Runtime.CompilerServices int entryIndex = _container.FindEntry(key, out otherValue); if (entryIndex != -1) { - throw new ArgumentException(SR.Argument_AddingDuplicate); + throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate, key)); } CreateEntry(key, value); |