+3
-10
lines changedFilter options
+3
-10
lines changed Original file line number Diff line number Diff line change
@@ -62,17 +62,10 @@ static ExceptionEntity GetEntity(Exception ex)
62
62
63
63
entity.ExceptionType = ex.GetType().Name;
64
64
65
-
var agex = ex as AggregateException;
66
-
var exl = new List<Exception>();
67
-
if (agex != null)
68
-
foreach (var ex0 in agex.InnerExceptions)
69
-
{
70
-
exl.AddRange(ex0.Follow(e => e.InnerException));
71
-
}
72
-
else
73
-
exl.AddRange(ex.Follow(e => e.InnerException));
65
+
var exceptions = ex is AggregateException agex ?
66
+
agex.InnerExceptions.SelectMany(inner => inner.Follow(e => e.InnerException)).ToList() :
67
+
ex.Follow(e => e.InnerException).ToList();
74
68
75
-
var exceptions = exl.Distinct();
76
69
string messages = exceptions.ToString(e => e.Message, "\r\n\r\n");
77
70
string stacktraces = exceptions.ToString(e => e.StackTrace, "\r\n\r\n");
78
71
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4