Skip to content

Commit 33b3c9e

Browse files
committed
Add exception capture for URI construction so InvalidOperationException is thrown instead.
1 parent 1e8a819 commit 33b3c9e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ private static ReadResult InternalLoad(MemoryStream input, string format, OpenAp
339339
}
340340
catch (Exception ex) when (
341341
ex is
342+
UriFormatException or
343+
FormatException or
342344
FileNotFoundException or
343345
PathTooLongException or
344346
DirectoryNotFoundException or

0 commit comments

Comments
 (0)