Skip to content

Commit 9b66e26

Browse files
committed
fix Azure#626
1 parent ab184cb commit 9b66e26

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Extensions/MemberInfoExtensions.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,15 @@ public static bool ExistsCustomAttribute<T>(this MemberInfo element, bool inheri
2424
{
2525
element.ThrowIfNullOrDefault();
2626

27-
var exists = element.GetCustomAttribute<T>(inherit) != null;
28-
29-
return exists;
27+
try
28+
{
29+
var exists = element.GetCustomAttribute<T>(inherit) != null;
30+
return exists;
31+
}
32+
catch (System.IO.FileNotFoundException)
33+
{
34+
return false;
35+
}
3036
}
3137

3238
/// <summary>

0 commit comments

Comments
 (0)