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

Commit 3c598e3

Browse files
authored
Merge pull request #9107 from mono/master-vsts1000977
Fixes VSTS Bug 1000977: Make preference dialog more resilient to
2 parents f8b972d + 3b8a683 commit 3c598e3

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

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

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,17 @@ 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+
}
666+
if (panel == null) {
667+
LoggingService.LogWarning ("Error panel == null: " + node.Id);
668+
continue;
669+
}
660670
pi = new PanelInstance ();
661671
pi.Panel = panel;
662672
pi.Node = node;
@@ -681,7 +691,12 @@ void CreatePageWidget (SectionPage page)
681691

682692
foreach (PanelInstance pi in page.Panels) {
683693
if (pi.Widget == null) {
684-
pi.Widget = pi.Panel.CreatePanelWidget ();
694+
try {
695+
pi.Widget = pi.Panel.CreatePanelWidget ();
696+
} catch (Exception e) {
697+
LoggingService.LogInternalError ("Error while creating panel widget for: " + pi.Node.Id, e);
698+
continue;
699+
}
685700
if (pi.Widget == null)
686701
continue;
687702

0 commit comments

Comments
 (0)