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

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung Yoon Whang <suwhang@microsoft.com>2019-08-08 00:49:25 +0300
committerMarek Safar <marek.safar@gmail.com>2019-08-08 11:10:47 +0300
commit240202cd90277eb9403b1c229bebcb177ffe1ca2 (patch)
tree2b10549e7dca85059ca4a1d1d2972c90db1dffee /netcore
parent53b9c8879578b8067b5e153fa4e03b2afaaf1eb0 (diff)
Improve ArgumentNullExceptions on DiagnosticCounter.DisplayName/Unit (#26035)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Diffstat (limited to 'netcore')
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Diagnostics/Tracing/DiagnosticCounter.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/netcore/System.Private.CoreLib/shared/System/Diagnostics/Tracing/DiagnosticCounter.cs b/netcore/System.Private.CoreLib/shared/System/Diagnostics/Tracing/DiagnosticCounter.cs
index 2fc5911bccf..742c357535a 100644
--- a/netcore/System.Private.CoreLib/shared/System/Diagnostics/Tracing/DiagnosticCounter.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Diagnostics/Tracing/DiagnosticCounter.cs
@@ -83,7 +83,7 @@ namespace System.Diagnostics.Tracing
set
{
if (value == null)
- throw new ArgumentException("Cannot set null as DisplayName");
+ throw new ArgumentNullException(nameof(DisplayName));
_displayName = value;
}
}
@@ -95,7 +95,7 @@ namespace System.Diagnostics.Tracing
set
{
if (value == null)
- throw new ArgumentException("Cannot set null as DisplayUnits");
+ throw new ArgumentNullException(nameof(DisplayUnits));
_displayUnits = value;
}
}