Skip to content

Commit f45335b

Browse files
committed
Fix CA2201: Do not raise reserved exception types
1 parent b6c2768 commit f45335b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/OpenApiTests/LegacyOpenApi/LegacyTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Reflection;
2+
using System.Resources;
23
using System.Text.Json;
34
using FluentAssertions;
45
using TestBuildingBlocks;
@@ -39,7 +40,8 @@ private async Task<string> GetExpectedSwaggerDocumentAsync()
3940

4041
if (stream == null)
4142
{
42-
throw new Exception($"Failed to load embedded resource '{embeddedResourceName}'. Set Build Action to Embedded Resource in properties.");
43+
throw new MissingManifestResourceException(
44+
$"Failed to load embedded resource '{embeddedResourceName}'. Set Build Action to Embedded Resource in properties.");
4345
}
4446

4547
using var reader = new StreamReader(stream);

0 commit comments

Comments
 (0)