Improve error message when deleting a profile that is in use

This commit is contained in:
Qstick
2018-02-15 22:03:24 -05:00
parent e8771c9c78
commit 425a9045b8
9 changed files with 43 additions and 22 deletions
@@ -44,7 +44,8 @@ namespace NzbDrone.Core.Profiles.Metadata
{
if (_artistService.GetAllArtists().Any(c => c.MetadataProfileId == id))
{
throw new MetadataProfileInUseException(id);
var profile = _profileRepository.Get(id);
throw new MetadataProfileInUseException(profile.Name);
}
_profileRepository.Delete(id);