diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-05-29 10:23:27 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-05-29 10:23:27 -0400 |
| commit | ccc8a12150f811cf43a41cb9593ea5efe4b323a9 (patch) | |
| tree | e7ac0ed285574219372363a8efa5e8190f72d533 | |
| parent | 6b180ba756d116379b58640db4abbb30a97f74ad (diff) | |
added error handling to the startup wizard
| -rw-r--r-- | MediaBrowser.ServerApplication/EntryPoints/StartupWizard.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/MediaBrowser.ServerApplication/EntryPoints/StartupWizard.cs b/MediaBrowser.ServerApplication/EntryPoints/StartupWizard.cs index 43d9018a1..22ec16b02 100644 --- a/MediaBrowser.ServerApplication/EntryPoints/StartupWizard.cs +++ b/MediaBrowser.ServerApplication/EntryPoints/StartupWizard.cs @@ -2,7 +2,10 @@ using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Plugins; +using MediaBrowser.Model.Logging; +using System.ComponentModel; using System.Linq; +using System.Windows; namespace MediaBrowser.ServerApplication.EntryPoints { @@ -19,6 +22,7 @@ namespace MediaBrowser.ServerApplication.EntryPoints /// The _user manager /// </summary> private readonly IUserManager _userManager; + private readonly ILogger _logger; private readonly IServerConfigurationManager _configurationManager; @@ -52,7 +56,16 @@ namespace MediaBrowser.ServerApplication.EntryPoints { var user = _userManager.Users.FirstOrDefault(u => u.Configuration.IsAdministrator); - App.OpenDashboardPage("wizardStart.html", user, _configurationManager); + try + { + App.OpenDashboardPage("wizardStart.html", user, _configurationManager); + } + catch (Win32Exception ex) + { + _logger.ErrorException("Error launching startup wizard", ex); + + MessageBox.Show("There was an error launching the Media Browser startup wizard. Please ensure a web browser is installed on the machine and is configured as the default browser.", "Media Browser"); + } } /// <summary> |
