diff --git a/src/Artemis.UI/Screens/Sidebar/Dialogs/ProfileConfigurationEditViewModel.cs b/src/Artemis.UI/Screens/Sidebar/Dialogs/ProfileConfigurationEditViewModel.cs index d91864ba7..ea22c1117 100644 --- a/src/Artemis.UI/Screens/Sidebar/Dialogs/ProfileConfigurationEditViewModel.cs +++ b/src/Artemis.UI/Screens/Sidebar/Dialogs/ProfileConfigurationEditViewModel.cs @@ -165,12 +165,19 @@ namespace Artemis.UI.Screens.Sidebar return; } - // Remove the temporary profile configuration - _profileService.RemoveProfileConfiguration(_profileConfiguration); - // Import the new profile configuration - _profileService.ImportProfile(_profileCategory, profileConfigurationExportModel); - - Close(_profileConfiguration); + try + { + ProfileConfiguration profileConfiguration = _profileService.ImportProfile(_profileCategory, profileConfigurationExportModel); + + // Remove the temporary profile configuration + _profileService.RemoveProfileConfiguration(_profileConfiguration); + + Close(profileConfiguration); + } + catch (Exception e) + { + _windowService.ShowExceptionDialog("Import profile failed", e); + } } private async Task ExecuteDelete()