aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Services/EntityAlreadyExistException.cs
blob: 0aaea012cd542aed29e6d74c29bd3515fae110ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Collections.Generic;

namespace Timeline.Services
{
    /// <summary>
    /// Thrown when an entity is already exists.
    /// </summary>
    /// <remarks>
    /// For example, want to create a timeline but a timeline with the same name already exists.
    /// </remarks>
    [Serializable]
    public class EntityAlreadyExistException : EntityException
    {
        public EntityAlreadyExistException() : base() { }
        public EntityAlreadyExistException(string? message) : base(message) { }
        public EntityAlreadyExistException(string? message, Exception? inner) : base(message, inner) { }
        public EntityAlreadyExistException(EntityType entityType, IDictionary<string, object> constraints, string? message = null, Exception? inner = null)
            : base(entityType, constraints, message ?? Resource.ExceptionEntityNotExist, inner)
        {

        }
        protected EntityAlreadyExistException(
          System.Runtime.Serialization.SerializationInfo info,
          System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
    }
}