diff options
author | crupest <crupest@outlook.com> | 2020-06-13 00:28:35 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-06-13 00:28:35 +0800 |
commit | d6e9ae92a782f747752d9e26504dc2f27e723f04 (patch) | |
tree | 57e3d021f6bd2aaa747e1e8fbffdf6a2636977f5 /Timeline/Services/Exceptions/TimelineNotExistException.cs | |
parent | b2dcd4529bfb80fa2f1e6095cd5c976d4e90ec8e (diff) | |
download | timeline-d6e9ae92a782f747752d9e26504dc2f27e723f04.tar.gz timeline-d6e9ae92a782f747752d9e26504dc2f27e723f04.tar.bz2 timeline-d6e9ae92a782f747752d9e26504dc2f27e723f04.zip |
refactor(back): Fix #100 .
Diffstat (limited to 'Timeline/Services/Exceptions/TimelineNotExistException.cs')
-rw-r--r-- | Timeline/Services/Exceptions/TimelineNotExistException.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Timeline/Services/Exceptions/TimelineNotExistException.cs b/Timeline/Services/Exceptions/TimelineNotExistException.cs new file mode 100644 index 00000000..70970b24 --- /dev/null +++ b/Timeline/Services/Exceptions/TimelineNotExistException.cs @@ -0,0 +1,21 @@ +using System;
+using System.Globalization;
+
+namespace Timeline.Services.Exceptions
+{
+ [Serializable]
+ public class TimelineNotExistException : EntityNotExistException
+ {
+ public TimelineNotExistException() : this(null, null) { }
+ public TimelineNotExistException(string? timelineName) : this(timelineName, null) { }
+ public TimelineNotExistException(string? timelineName, Exception? inner) : this(timelineName, null, inner) { }
+ public TimelineNotExistException(string? timelineName, string? message, Exception? inner = null)
+ : base(EntityNames.Timeline, null, string.Format(CultureInfo.InvariantCulture, Resources.Services.Exceptions.TimelineNotExistException, timelineName ?? "").AppendAdditionalMessage(message), inner) { TimelineName = timelineName; }
+
+ protected TimelineNotExistException(
+ System.Runtime.Serialization.SerializationInfo info,
+ System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
+
+ public string? TimelineName { get; set; }
+ }
+}
|