Skip to content

Commit 3b241f7

Browse files
committed
Error handling around demystified which may time out
1 parent 1ff79df commit 3b241f7

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/ExceptionVisualizerSource/ExceptionModelSource.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,13 @@ private static ExceptionModel Convert(Exception e)
5454
.Select(p => new KeyValuePair<string, string>(p.Name, p.GetValue(e)?.ToString()))
5555
.ToList()
5656
};
57-
var stackTrace = new EnhancedStackTrace(e);
58-
if (stackTrace.FrameCount > 0)
57+
try
5958
{
60-
model.Demystified = stackTrace.ToString();
59+
var stackTrace = new EnhancedStackTrace(e);
60+
if (stackTrace.FrameCount > 0)
61+
model.Demystified = stackTrace.ToString();
6162
}
63+
catch { }
6264

6365
if (e is AggregateException aggregateException && aggregateException.InnerExceptions?.Count> 0)
6466
{

0 commit comments

Comments
 (0)