Minor update to avoid iterating inner exceptions if there is more than 1
MODIFY
src/Chapter14/Listing14.10.HandlingExceptionsFromSubscribers.cs
src/Chapter14/Listing14.10.HandlingExceptionsFromSubscribers.cs
catch(AggregateException exception)
{
Console.WriteLine(exception.Message);
+ if (exception.InnerExceptions.Count < 1)
+ {
+ // Enumerate the exceptions only if there is more than
+ // one because with one the message gets merged into the
+ // Aggregate exception message.
foreach (Exception item in exception.InnerExceptions)
{
Console.WriteLine("\t{0}: {1}",
}
}
}
+}
\ No newline at end of file

Minor update to avoid iterating inner exceptions if there is more than 1