-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConsoleLogger will expose ExceptionData #2217
Conversation
src/Sarif/Writers/ConsoleLogger.cs
Outdated
if (notification.Exception != null) | ||
{ | ||
sb.AppendLine(); | ||
sb.AppendLine(JsonConvert.SerializeObject(notification.Exception)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JsonConvert.SerializeObject(notification.Exception) [](start = 30, length = 51)
Since Exception isn't an exception class, its an ExceptionData class from sarif, it does not expose a ToString which generate all the fields. With that in mind, I switched to serializing it. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's write an ExceptionData.ToString() implementation here that mirrors System.Exception.ToString() behavior
In reply to: 551626348 [](ancestors = 551626348)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #2216