Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 8a889c6

Browse files
committed
Add some debug assertions
1 parent 9262022 commit 8a889c6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/GitHub.Exports/Services/PackageSettings.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Microsoft.VisualStudio.Shell.Settings;
88
using SettingsStore = GitHub.Helpers.SettingsStore;
99
using System.Diagnostics;
10+
using System.Globalization;
1011

1112
namespace GitHub.Services
1213
{
@@ -75,7 +76,10 @@ void LoadSettings()
7576
}
7677
catch (Exception ex)
7778
{
79+
Debug.Fail(String.Format(CultureInfo.InvariantCulture, "PackageSettings: Unable to load settings. {0}", ex));
80+
#if !DEBUG
7881
VsOutputLogger.WriteLine("PackageSettings: Unable to load settings. {0}", ex);
82+
#endif
7983
}
8084
}
8185

@@ -90,7 +94,10 @@ void SaveSettings()
9094
}
9195
catch (Exception ex)
9296
{
93-
VsOutputLogger.WriteLine("PackageSettings: Unable to load settings. {0}", ex);
97+
Debug.Fail(String.Format(CultureInfo.InvariantCulture, "PackageSettings: Unable to save settings. {0}", ex));
98+
#if !DEBUG
99+
VsOutputLogger.WriteLine("PackageSettings: Unable to save settings. {0}", ex);
100+
#endif
94101
}
95102
}
96103
}

0 commit comments

Comments
 (0)