Getting model by invalid ID throws a more specific exception.

This commit is contained in:
Keivan Beigi 2013-07-09 15:06:30 -07:00
commit 54c36e9264
8 changed files with 38 additions and 11 deletions

View file

@ -26,7 +26,7 @@ namespace NzbDrone.Core.Qualities
}
catch (InvalidOperationException e)
{
throw new InvalidOperationException("Sequence contains no element with qualityId = " + qualityId.ToString());
throw new ModelNotFoundException(typeof(QualitySize), qualityId);
}
}
}