From 41b5dc3ae3999645a494b1aa8ae4a0ab6659cc3a Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Mon, 11 Jan 2016 12:45:55 -0600 Subject: [PATCH] Show the message but not the stack trace in SA0002 details --- .../SpecialRules/SA0002InvalidSettingsFile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/SpecialRules/SA0002InvalidSettingsFile.cs b/StyleCop.Analyzers/StyleCop.Analyzers/SpecialRules/SA0002InvalidSettingsFile.cs index 5f6784144..87cb7cc32 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/SpecialRules/SA0002InvalidSettingsFile.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/SpecialRules/SA0002InvalidSettingsFile.cs @@ -49,7 +49,7 @@ private static void HandleCompilation(CompilationAnalysisContext context) } catch (JsonException ex) { - string details = ex.ToString(); + string details = ex.Message; string completeDescription = string.Format(Description.ToString(CultureInfo.CurrentCulture), details); var completeDescriptor = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, AnalyzerCategory.SpecialRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, completeDescription, HelpLink);