Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 2af3fcb

Browse files
committed
Added default ReportErrors delegate that does nothing.
This is necessary after the fix in commit 295f625. Before that commit the ReportErrors was semi-optional; When loading was successful ReportErrors was never called (ReportErrors optional), but when document failed to be created a NullReferenceException was thrown because ReportErrors did not have a delegate. See also commit 006558f, that throws a more friendly exception than NullReferenceException when document fails to load.
1 parent 899a0ee commit 2af3fcb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Xaml/XamlLoadSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public sealed class XamlLoadSettings
1616
{
1717
public readonly ICollection<Assembly> DesignerAssemblies = new List<Assembly>();
1818
public readonly List<Action<XamlDesignContext>> CustomServiceRegisterFunctions = new List<Action<XamlDesignContext>>();
19-
public Action<XamlErrorService> ReportErrors;
19+
public Action<XamlErrorService> ReportErrors = (errorService) => { };
2020
XamlTypeFinder typeFinder = XamlTypeFinder.CreateWpfTypeFinder();
2121

2222
public XamlTypeFinder TypeFinder {

0 commit comments

Comments
 (0)