Skip to content

Commit 41b5dc3

Browse files
committed
Show the message but not the stack trace in SA0002 details
1 parent e3bb82a commit 41b5dc3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

StyleCop.Analyzers/StyleCop.Analyzers/SpecialRules/SA0002InvalidSettingsFile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ private static void HandleCompilation(CompilationAnalysisContext context)
4949
}
5050
catch (JsonException ex)
5151
{
52-
string details = ex.ToString();
52+
string details = ex.Message;
5353
string completeDescription = string.Format(Description.ToString(CultureInfo.CurrentCulture), details);
5454

5555
var completeDescriptor = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, AnalyzerCategory.SpecialRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, completeDescription, HelpLink);

0 commit comments

Comments
 (0)