aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Services/BadPasswordException.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-10-21 20:47:31 +0800
committer杨宇千 <crupest@outlook.com>2019-10-21 20:47:31 +0800
commitec7dfb73ace61a1aba5156cc1048cbe32ee1cee6 (patch)
treee6a9d4204e4fcd047cfcf5acd4ff566cf8bb69ff /Timeline/Services/BadPasswordException.cs
parent0384a07729fc340852e4e862f431acd66771d48e (diff)
downloadtimeline-ec7dfb73ace61a1aba5156cc1048cbe32ee1cee6.tar.gz
timeline-ec7dfb73ace61a1aba5156cc1048cbe32ee1cee6.tar.bz2
timeline-ec7dfb73ace61a1aba5156cc1048cbe32ee1cee6.zip
...
Diffstat (limited to 'Timeline/Services/BadPasswordException.cs')
-rw-r--r--Timeline/Services/BadPasswordException.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/Timeline/Services/BadPasswordException.cs b/Timeline/Services/BadPasswordException.cs
new file mode 100644
index 00000000..ee8a42db
--- /dev/null
+++ b/Timeline/Services/BadPasswordException.cs
@@ -0,0 +1,27 @@
+using System;
+using Timeline.Helpers;
+
+namespace Timeline.Services
+{
+ [Serializable]
+ public class BadPasswordException : Exception
+ {
+ public BadPasswordException() : base(Resources.Services.Exception.UserNotExistException) { }
+ public BadPasswordException(string message, Exception inner) : base(message, inner) { }
+
+ public BadPasswordException(string badPassword)
+ : base(Log.Format(Resources.Services.Exception.UserNotExistException, ("Bad Password", badPassword)))
+ {
+ Password = badPassword;
+ }
+
+ protected BadPasswordException(
+ System.Runtime.Serialization.SerializationInfo info,
+ System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
+
+ /// <summary>
+ /// The wrong password.
+ /// </summary>
+ public string? Password { get; set; }
+ }
+}