using System; using System.Runtime.Serialization; namespace Kyoo.Abstractions.Models.Exceptions { /// /// An exception raised when an item already exists in the database. /// [Serializable] public class DuplicatedItemException : Exception { /// /// Create a new with the default message. /// public DuplicatedItemException() : base("Already exists in the database.") { } /// /// Create a new with a custom message. /// /// The message to use public DuplicatedItemException(string message) : base(message) { } /// /// The serialization constructor /// /// Serialization infos /// The serialization context protected DuplicatedItemException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }