Skip to content

Commit

Permalink
add ZeroDataException
Browse files Browse the repository at this point in the history
  • Loading branch information
smasher164 committed Jun 2, 2022
1 parent dd3bbc9 commit 43ba3ad
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public static InstanceDataCollectionCollection GetInstanceDataCollectionCollecti
var idcc = pcc.ReadCategory();
if (idcc.Values.Count == 0)
{
throw new Exception();
throw new ZeroDataException();
}
return idcc;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
<Compile Include="CounterCreationDataCollectionTests.cs" />
<Compile Include="InstanceDataTests.cs" />
<Compile Include="Helpers.cs" />
<Compile Include="$(CommonTestPath)System\ShouldNotBeInvokedException.cs"
Link="Common\System\ShouldNotBeInvokedException.cs" />
<Compile Include="$(CommonTestPath)System\ShouldNotBeInvokedException.cs" Link="Common\System\ShouldNotBeInvokedException.cs" />
<Compile Include="PerformanceDataTests.cs" />
<Compile Include="ZeroDataException.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="provider.man" CopyToOutputDirectory="Always" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Diagnostics.Tests
{
public class ZeroDataException : Exception
{
public ZeroDataException() { }
}
}

0 comments on commit 43ba3ad

Please sign in to comment.