Sidebar - Show message when profile is broken

Events - Keep the old event type around for if you change your mind
This commit is contained in:
Robert committed 2021-09-18 13:38:09 +02:00
1 parent d6372dffad
commit 02f4609eae
8 files changed
+78 -27

No files matched your search

@@ -327,7 +327,17 @@ namespace Artemis.Core.Services
if (profileConfiguration.Profile != null)
return profileConfiguration.Profile;
ProfileEntity profileEntity = _profileRepository.Get(profileConfiguration.Entity.ProfileId);
ProfileEntity profileEntity;
try
{
profileEntity = _profileRepository.Get(profileConfiguration.Entity.ProfileId);
}
catch (Exception e)
{
profileConfiguration.SetBrokenState("Failed to activate profile", e);
throw;
}
if (profileEntity == null)
throw new ArtemisCoreException($"Cannot find profile named: {profileConfiguration.Name} ID: {profileConfiguration.Entity.ProfileId}");