diff --git a/src/Microsoft.DocAsCode.Dotnet/SymbolFormatter.Syntax.cs b/src/Microsoft.DocAsCode.Dotnet/SymbolFormatter.Syntax.cs index 20e835a36ac..3250139b081 100644 --- a/src/Microsoft.DocAsCode.Dotnet/SymbolFormatter.Syntax.cs +++ b/src/Microsoft.DocAsCode.Dotnet/SymbolFormatter.Syntax.cs @@ -507,9 +507,16 @@ private ISymbol HidePropertyAccessorIfNeeded(ISymbol symbol) private ImmutableArray GetDisplayParts(ISymbol symbol, SymbolDisplayFormat format) { - return Language is SyntaxLanguage.VB - ? VB.SymbolDisplay.ToDisplayParts(symbol, format) - : CS.SymbolDisplay.ToDisplayParts(symbol, format); + try + { + return Language is SyntaxLanguage.VB + ? VB.SymbolDisplay.ToDisplayParts(symbol, format) + : CS.SymbolDisplay.ToDisplayParts(symbol, format); + } + catch + { + return ImmutableArray.Empty; + } } } }