Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/System.Private.Threading/src/System/AggregateException.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/System.Private.Threading/src/System/AggregateException.cs b/src/System.Private.Threading/src/System/AggregateException.cs
index a0700b351..fb644e7a4 100644
--- a/src/System.Private.Threading/src/System/AggregateException.cs
+++ b/src/System.Private.Threading/src/System/AggregateException.cs
@@ -379,6 +379,30 @@ namespace System
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>