@@ -670,7 +670,7 @@ namespace Avalonia
"Error binding to {Target}.{Property}: {Message}",
this,
property,
- notification.Error.Message);
+ ExceptionUtilities.GetMessage(notification.Error));
}
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Avalonia.Utilities
+{
+ internal static class ExceptionUtilities
+ {
+ public static string GetMessage(Exception e)
+ var aggregate = e as AggregateException;
+ if (aggregate != null)
+ return string.Join(" | ", aggregate.InnerExceptions.Select(x => x.Message));
+ }
+ return e.Message;
+}
@@ -43,7 +43,8 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml
pv.Length == 3 &&
pv[0] is ProgressBar &&
object.ReferenceEquals(pv[1], ProgressBar.ValueProperty) &&
- (string)pv[2] == "Could not convert FallbackValue 'bar' to 'System.Double'")
+ (string)pv[2] == "Object reference not set to an instance of an object. | " +
+ "Could not convert FallbackValue 'bar' to 'System.Double'")
{
called = true;