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

Commit 63cdb81

Browse files
committed
Fixes VSTS Bug 1000977: Make preference dialog more resilient to extension errors
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1000977
1 parent 51a7165 commit 63cdb81

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/OptionsDialog.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,13 @@ SectionPage CreatePage (TreeIter it, OptionsDialogSection section, object dataOb
656656
}
657657
}
658658
if (pi == null) {
659-
IOptionsPanel panel = node.CreatePanel ();
659+
IOptionsPanel panel;
660+
try {
661+
panel = node.CreatePanel ();
662+
} catch (Exception e) {
663+
LoggingService.LogInternalError ("Error while creating options panel: " + node.Id, e);
664+
continue;
665+
}
660666
pi = new PanelInstance ();
661667
pi.Panel = panel;
662668
pi.Node = node;
@@ -681,7 +687,12 @@ void CreatePageWidget (SectionPage page)
681687

682688
foreach (PanelInstance pi in page.Panels) {
683689
if (pi.Widget == null) {
684-
pi.Widget = pi.Panel.CreatePanelWidget ();
690+
try {
691+
pi.Widget = pi.Panel.CreatePanelWidget ();
692+
} catch (Exception e) {
693+
LoggingService.LogInternalError ("Error while creating panel widget for: " + pi.Node.Id, e);
694+
continue;
695+
}
685696
if (pi.Widget == null)
686697
continue;
687698

0 commit comments

Comments
 (0)