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

@ -0,0 +1,14 @@
using System;
using NzbDrone.Common.Exceptions;
namespace NzbDrone.Core.Datastore
{
public class ModelNotFoundException : NzbDroneException
{
public ModelNotFoundException(Type modelType, int modelId)
: base("{0} with ID {1} does not exist", modelType.Name, modelId)
{
}
}
}