diff options
author | 杨宇千 <crupest@outlook.com> | 2019-10-21 20:47:31 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-10-21 20:47:31 +0800 |
commit | c442b7ad597f430b186dd8019de70332b574c4ba (patch) | |
tree | e6a9d4204e4fcd047cfcf5acd4ff566cf8bb69ff /Timeline/Services/BadPasswordException.cs | |
parent | 4c52f2d8b7aae43f391f54fb67fe91b8bc64e0c5 (diff) | |
download | timeline-c442b7ad597f430b186dd8019de70332b574c4ba.tar.gz timeline-c442b7ad597f430b186dd8019de70332b574c4ba.tar.bz2 timeline-c442b7ad597f430b186dd8019de70332b574c4ba.zip |
...
Diffstat (limited to 'Timeline/Services/BadPasswordException.cs')
-rw-r--r-- | Timeline/Services/BadPasswordException.cs | 27 |
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; }
+ }
+}
|