diff options
author | Marco Rossignoli <marco.rossignoli@gmail.com> | 2018-03-05 21:09:24 +0300 |
---|---|---|
committer | Ahson Khan <ahkha@microsoft.com> | 2018-03-05 22:13:47 +0300 |
commit | 01180c3c6880327277672db99d8326cfec0832a4 (patch) | |
tree | 461721898a83187da39fcce58197649b58168e9a /src | |
parent | 26a7144bf8d48c2310aca9c9c56e6ce3eead0bb5 (diff) |
Scrub error messages for missing arguments(throw new) (#16753)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Globalization/DateTimeFormatInfo.cs | 4 | ||||
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Type.cs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Globalization/DateTimeFormatInfo.cs b/src/System.Private.CoreLib/shared/System/Globalization/DateTimeFormatInfo.cs index faa0deac3..edec75ac8 100644 --- a/src/System.Private.CoreLib/shared/System/Globalization/DateTimeFormatInfo.cs +++ b/src/System.Private.CoreLib/shared/System/Globalization/DateTimeFormatInfo.cs @@ -1602,7 +1602,7 @@ namespace System.Globalization result = this.AllYearMonthPatterns; break; default: - throw new ArgumentException(SR.Format_BadFormatSpecifier, nameof(format)); + throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)); } return (result); } @@ -1950,7 +1950,7 @@ namespace System.Globalization break; default: - throw new ArgumentException(SR.Format_BadFormatSpecifier, nameof(format)); + throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)); } // Clear the token hash table, note that even short dates could require this diff --git a/src/System.Private.CoreLib/shared/System/Type.cs b/src/System.Private.CoreLib/shared/System/Type.cs index a0d219ddd..b57baa869 100644 --- a/src/System.Private.CoreLib/shared/System/Type.cs +++ b/src/System.Private.CoreLib/shared/System/Type.cs @@ -349,7 +349,7 @@ namespace System public static Type MakeGenericMethodParameter(int position) { if (position < 0) - throw new ArgumentException(SR.ArgumentOutOfRange_MustBeNonNegNum, nameof(position)); + throw new ArgumentException(SR.ArgumentOutOfRange_NeedNonNegNum, nameof(position)); return new SignatureGenericMethodParameterType(position); } |