diff --git a/src/System.Private.CoreLib/Resources/Strings.resx b/src/System.Private.CoreLib/Resources/Strings.resx
index 48cbbcffc836..3bd8d5abf95d 100644
--- a/src/System.Private.CoreLib/Resources/Strings.resx
+++ b/src/System.Private.CoreLib/Resources/Strings.resx
@@ -668,7 +668,7 @@
Insufficient memory to continue the execution of the program.
- Parameter name: {0}
+ (Parameter '{0}')
Must specify one or more parameters.
diff --git a/src/System.Private.CoreLib/shared/System/AggregateException.cs b/src/System.Private.CoreLib/shared/System/AggregateException.cs
index 08cda7c38834..d19a70e546bf 100644
--- a/src/System.Private.CoreLib/shared/System/AggregateException.cs
+++ b/src/System.Private.CoreLib/shared/System/AggregateException.cs
@@ -451,8 +451,10 @@ public override string ToString()
for (int i = 0; i < m_innerExceptions.Count; i++)
{
- text.AppendLine();
- text.Append("---> ");
+ if (m_innerExceptions[i] == InnerException)
+ continue; // Already logged in base.ToString()
+
+ text.Append(Environment.NewLine).Append(InnerExceptionPrefix);
text.AppendFormat(CultureInfo.InvariantCulture, SR.AggregateException_InnerException, i);
text.Append(m_innerExceptions[i].ToString());
text.Append("<---");
diff --git a/src/System.Private.CoreLib/shared/System/ArgumentException.cs b/src/System.Private.CoreLib/shared/System/ArgumentException.cs
index 6e38c7b3f2d1..a803b1a4260d 100644
--- a/src/System.Private.CoreLib/shared/System/ArgumentException.cs
+++ b/src/System.Private.CoreLib/shared/System/ArgumentException.cs
@@ -81,11 +81,10 @@ public override string Message
string s = base.Message;
if (!string.IsNullOrEmpty(_paramName))
{
- string resourceString = SR.Format(SR.Arg_ParamName_Name, _paramName);
- return s + Environment.NewLine + resourceString;
+ s += " " + SR.Format(SR.Arg_ParamName_Name, _paramName);
}
- else
- return s;
+
+ return s;
}
}
diff --git a/src/System.Private.CoreLib/shared/System/BadImageFormatException.cs b/src/System.Private.CoreLib/shared/System/BadImageFormatException.cs
index 23aa56453bc6..913e2b9e3ab0 100644
--- a/src/System.Private.CoreLib/shared/System/BadImageFormatException.cs
+++ b/src/System.Private.CoreLib/shared/System/BadImageFormatException.cs
@@ -104,7 +104,7 @@ public override string ToString()
s += Environment.NewLine + SR.Format(SR.IO_FileName_Name, _fileName);
if (InnerException != null)
- s = s + " ---> " + InnerException.ToString();
+ s = s + InnerExceptionPrefix + InnerException.ToString();
if (StackTrace != null)
s += Environment.NewLine + StackTrace;
diff --git a/src/System.Private.CoreLib/shared/System/Exception.cs b/src/System.Private.CoreLib/shared/System/Exception.cs
index 2f07ca2aba2b..30b808d9668b 100644
--- a/src/System.Private.CoreLib/shared/System/Exception.cs
+++ b/src/System.Private.CoreLib/shared/System/Exception.cs
@@ -11,6 +11,8 @@ namespace System
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public partial class Exception : ISerializable
{
+ internal protected const string InnerExceptionPrefix = " ---> ";
+
public Exception()
{
_HResult = HResults.COR_E_EXCEPTION;
@@ -151,7 +153,7 @@ public override string ToString()
if (_innerException != null)
{
- s = s + " ---> " + _innerException.ToString() + Environment.NewLine +
+ s = s + Environment.NewLine + InnerExceptionPrefix + _innerException.ToString() + Environment.NewLine +
" " + SR.Exception_EndOfInnerExceptionStack;
}
diff --git a/src/System.Private.CoreLib/shared/System/IO/FileLoadException.cs b/src/System.Private.CoreLib/shared/System/IO/FileLoadException.cs
index 729d480d959c..30f02786ed9d 100644
--- a/src/System.Private.CoreLib/shared/System/IO/FileLoadException.cs
+++ b/src/System.Private.CoreLib/shared/System/IO/FileLoadException.cs
@@ -64,7 +64,7 @@ public override string ToString()
s += Environment.NewLine + SR.Format(SR.IO_FileName_Name, FileName);
if (InnerException != null)
- s = s + " ---> " + InnerException.ToString();
+ s = s + Environment.NewLine + InnerExceptionPrefix + InnerException.ToString();
if (StackTrace != null)
s += Environment.NewLine + StackTrace;
diff --git a/src/System.Private.CoreLib/shared/System/IO/FileNotFoundException.cs b/src/System.Private.CoreLib/shared/System/IO/FileNotFoundException.cs
index 0ce1c74da349..334325b40a8c 100644
--- a/src/System.Private.CoreLib/shared/System/IO/FileNotFoundException.cs
+++ b/src/System.Private.CoreLib/shared/System/IO/FileNotFoundException.cs
@@ -78,7 +78,7 @@ public override string ToString()
s += Environment.NewLine + SR.Format(SR.IO_FileName_Name, FileName);
if (InnerException != null)
- s = s + " ---> " + InnerException.ToString();
+ s = s + Environment.NewLine + InnerExceptionPrefix + InnerException.ToString();
if (StackTrace != null)
s += Environment.NewLine + StackTrace;
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/COMException.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/COMException.cs
index 2dec6b8ffbb9..1b66bb6379a4 100644
--- a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/COMException.cs
+++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/COMException.cs
@@ -48,7 +48,7 @@ protected COMException(SerializationInfo info, StreamingContext context) : base(
public override string ToString()
{
StringBuilder s = new StringBuilder();
-
+
string className = GetType().ToString();
s.Append(className).Append(" (0x").Append(HResult.ToString("X8", CultureInfo.InvariantCulture)).Append(')');
@@ -61,7 +61,7 @@ public override string ToString()
Exception? innerException = InnerException;
if (innerException != null)
{
- s.Append(" ---> ").Append(innerException.ToString());
+ s.Append(Environment.NewLine).Append(InnerExceptionPrefix).Append(innerException.ToString());
}
string? stackTrace = StackTrace;
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ExternalException.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ExternalException.cs
index d587d820a7b7..9028288b10da 100644
--- a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ExternalException.cs
+++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ExternalException.cs
@@ -75,7 +75,7 @@ public override string ToString()
Exception? innerException = InnerException;
if (innerException != null)
{
- s = s + " ---> " + innerException.ToString();
+ s = s + Environment.NewLine + InnerExceptionPrefix + innerException.ToString();
}
if (StackTrace != null)
diff --git a/tests/CoreFX/CoreFX.issues.rsp b/tests/CoreFX/CoreFX.issues.rsp
index 8a35ea39f6a4..40c0fd49b3d6 100644
--- a/tests/CoreFX/CoreFX.issues.rsp
+++ b/tests/CoreFX/CoreFX.issues.rsp
@@ -92,6 +92,10 @@
# Assert: https://github.com/dotnet/coreclr/issues/25050
-nonamespace System.Data.Common.Tests
+# requires corefx test updates
+-nomethod System.Data.Tests.Common.DbConnectionStringBuilderTest.Add_Keyword_Invalid
+-nomethod System.Data.Tests.Common.DbConnectionStringBuilderTest.Indexer_Keyword_Invalid
+
# requires corefx test updates https://github.com/dotnet/corefx/pull/38452
-nomethod System.SpanTests.ReadOnlySpanTests.ZeroLengthIndexOfAny_ManyInteger
-nomethod System.SpanTests.ReadOnlySpanTests.ZeroLengthIndexOfAny_ManyString