Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarco Rossignoli <marco.rossignoli@gmail.com>2018-03-05 21:09:24 +0300
committerAhson Khan <ahkha@microsoft.com>2018-03-05 22:13:47 +0300
commit01180c3c6880327277672db99d8326cfec0832a4 (patch)
tree461721898a83187da39fcce58197649b58168e9a /src
parent26a7144bf8d48c2310aca9c9c56e6ce3eead0bb5 (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.cs4
-rw-r--r--src/System.Private.CoreLib/shared/System/Type.cs2
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);
}