Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 3602c17

Browse files
luqunldanmoseley
authored andcommitted
Fix for 17289 (#17336)
1 parent 3632a51 commit 3602c17

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/src/Interop/ClassicCOM/ClassicCOMUnitTest.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,16 @@ static bool AcivateCOMType()
107107
Console.WriteLine("Caught unexpected PlatformNotSupportedException: " + e);
108108
return false;
109109
}
110+
catch(System.Runtime.InteropServices.COMException e)
111+
{
112+
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
113+
{
114+
return true;
115+
}
116+
117+
Console.WriteLine("Caught unexpected COMException: " + e);
118+
return false;
119+
}
110120
catch (Exception e)
111121
{
112122
Console.WriteLine("Caught unexpected exception: " + e);

0 commit comments

Comments
 (0)