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 | ec7dfb73ace61a1aba5156cc1048cbe32ee1cee6 (patch) | |
tree | e6a9d4204e4fcd047cfcf5acd4ff566cf8bb69ff /Timeline/Services/UsernameBadFormatException.cs | |
parent | 0384a07729fc340852e4e862f431acd66771d48e (diff) | |
download | timeline-ec7dfb73ace61a1aba5156cc1048cbe32ee1cee6.tar.gz timeline-ec7dfb73ace61a1aba5156cc1048cbe32ee1cee6.tar.bz2 timeline-ec7dfb73ace61a1aba5156cc1048cbe32ee1cee6.zip |
...
Diffstat (limited to 'Timeline/Services/UsernameBadFormatException.cs')
-rw-r--r-- | Timeline/Services/UsernameBadFormatException.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Timeline/Services/UsernameBadFormatException.cs b/Timeline/Services/UsernameBadFormatException.cs new file mode 100644 index 00000000..04354d22 --- /dev/null +++ b/Timeline/Services/UsernameBadFormatException.cs @@ -0,0 +1,27 @@ +using System;
+
+namespace Timeline.Services
+{
+ /// <summary>
+ /// Thrown when username is of bad format.
+ /// </summary>
+ [Serializable]
+ public class UsernameBadFormatException : Exception
+ {
+ public UsernameBadFormatException() : base(Resources.Services.Exception.UsernameBadFormatException) { }
+ public UsernameBadFormatException(string message) : base(message) { }
+ public UsernameBadFormatException(string message, Exception inner) : base(message, inner) { }
+
+ public UsernameBadFormatException(string username, string message) : base(message) { Username = username; }
+ public UsernameBadFormatException(string username, string message, Exception inner) : base(message, inner) { Username = username; }
+
+ protected UsernameBadFormatException(
+ System.Runtime.Serialization.SerializationInfo info,
+ System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
+
+ /// <summary>
+ /// Username of bad format.
+ /// </summary>
+ public string? Username { get; private set; }
+ }
+}
|