From a672e10faad434899d81ef9d0d0d5adbbc7841da Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 30 Apr 2021 16:52:55 +0800 Subject: refactor: ... --- BackEnd/Timeline/Services/EntityNotExistException.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'BackEnd/Timeline/Services/EntityNotExistException.cs') diff --git a/BackEnd/Timeline/Services/EntityNotExistException.cs b/BackEnd/Timeline/Services/EntityNotExistException.cs index 39a4f545..0c836fc4 100644 --- a/BackEnd/Timeline/Services/EntityNotExistException.cs +++ b/BackEnd/Timeline/Services/EntityNotExistException.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; namespace Timeline.Services { @@ -9,19 +10,18 @@ namespace Timeline.Services /// For example, you want to get a timeline with given name but it does not exist. /// [Serializable] - public class EntityNotExistException : Exception + public class EntityNotExistException : EntityException { - public EntityNotExistException() : this(null, null) { } - public EntityNotExistException(string? entityName) : this(entityName, null) { } - public EntityNotExistException(string? entityName, Exception? inner) : this(entityName, null, inner) { } - public EntityNotExistException(string? entityName, string? message, Exception? inner) : base(message ?? Resource.ExceptionEntityNotExist, inner) + public EntityNotExistException() : base() { } + public EntityNotExistException(string? message) : base(message) { } + public EntityNotExistException(string? message, Exception? inner) : base(message, inner) { } + public EntityNotExistException(EntityType entityType, IDictionary constraints, string? message = null, Exception? inner = null) + : base(entityType, constraints, message ?? Resource.ExceptionEntityNotExist, inner) { - EntityName = entityName; + } protected EntityNotExistException( System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } - - public string? EntityName { get; } } } -- cgit v1.2.3