private static void DumpException(StringBuilder sb, int indent, AggregateException aggregateException) { ExceptionExtensions.AppendWithIndent(sb, indent, (Exception)aggregateException); foreach (Exception exception in aggregateException.InnerExceptions) { ExceptionExtensions.DumpException(sb, indent + 1, exception); } }
private static void DumpException(StringBuilder sb, int indent, Exception exception) { AggregateException aggregateException = exception as AggregateException; if (null != aggregateException) { ExceptionExtensions.DumpException(sb, indent, aggregateException); } else { ExceptionExtensions.AppendWithIndent(sb, indent, exception); } }