Skip to content

Commit

Permalink
Merge pull request dotnet#646 from stephentoub/port_2642
Browse files Browse the repository at this point in the history
Port dotnet/coreclr#2642 to CoreRT
  • Loading branch information
jkotas committed Jan 14, 2016
2 parents 811a323 + 3122f02 commit 6532e47
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/System.Private.Threading/src/System/AggregateException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,30 @@ public AggregateException Flatten()
return new AggregateException(Message, flattenedExceptions);
}

/// <summary>Gets a message that describes the exception.</summary>
public override string Message
{
get
{
if (m_innerExceptions.Count == 0)
{
return base.Message;
}

StringBuilder sb = new StringBuilder();
sb.Append(base.Message);
sb.Append(' ');
for (int i = 0; i < m_innerExceptions.Count; i++)
{
sb.Append('(');
sb.Append(m_innerExceptions[i].Message);
sb.Append(") ");
}
sb.Length -= 1;
return sb.ToString();
}
}

/// <summary>
/// Creates and returns a string representation of the current <see cref="AggregateException"/>.
/// </summary>
Expand Down

0 comments on commit 6532e47

Please sign in to comment.