forked from smiley22/S22.Imap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Exceptions.cs
116 lines (113 loc) · 5.53 KB
/
Exceptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
using System;
using System.Runtime.Serialization;
namespace S22.Imap {
/// <summary>
/// The exception that is thrown when an unexpected response is received from the server.
/// </summary>
[Serializable]
public class BadServerResponseException : Exception {
/// <summary>
/// Initializes a new instance of the BadServerResponseException class
/// </summary>
public BadServerResponseException() : base() { }
/// <summary>
/// Initializes a new instance of the BadServerResponseException class with its message
/// string set to <paramref name="message"/>.
/// </summary>
/// <param name="message">A description of the error. The content of message is intended
/// to be understood by humans.</param>
public BadServerResponseException(string message) : base(message) { }
/// <summary>
/// Initializes a new instance of the BadServerResponseException class with its message
/// string set to <paramref name="message"/> and a reference to the inner exception that
/// is the cause of this exception.
/// </summary>
/// <param name="message">A description of the error. The content of message is intended
/// to be understood by humans.</param>
/// <param name="inner">The exception that is the cause of the current exception.</param>
public BadServerResponseException(string message, Exception inner) : base(message, inner) { }
/// <summary>
/// Initializes a new instance of the BadServerResponseException class with the specified
/// serialization and context information.
/// </summary>
/// <param name="info">An object that holds the serialized object data about the exception
/// being thrown. </param>
/// <param name="context">An object that contains contextual information about the source
/// or destination. </param>
protected BadServerResponseException(SerializationInfo info, StreamingContext context)
: base(info, context) { }
}
/// <summary>
/// The exception that is thrown when the supplied credentials were rejected by the server.
/// </summary>
[Serializable]
public class InvalidCredentialsException : Exception {
/// <summary>
/// Initializes a new instance of the InvalidCredentialsException class
/// </summary>
public InvalidCredentialsException() : base() { }
/// <summary>
/// Initializes a new instance of the InvalidCredentialsException class with its message
/// string set to <paramref name="message"/>.
/// </summary>
/// <param name="message">A description of the error. The content of message is intended
/// to be understood by humans.</param>
public InvalidCredentialsException(string message) : base(message) { }
/// <summary>
/// Initializes a new instance of the InvalidCredentialsException class with its message
/// string set to <paramref name="message"/> and a reference to the inner exception that
/// is the cause of this exception.
/// </summary>
/// <param name="message">A description of the error. The content of message is intended
/// to be understood by humans.</param>
/// <param name="inner">The exception that is the cause of the current exception.</param>
public InvalidCredentialsException(string message, Exception inner) : base(message, inner) { }
/// <summary>
/// Initializes a new instance of the InvalidCredentialsException class with the specified
/// serialization and context information.
/// </summary>
/// <param name="info">An object that holds the serialized object data about the exception
/// being thrown. </param>
/// <param name="context">An object that contains contextual information about the source
/// or destination. </param>
protected InvalidCredentialsException(SerializationInfo info, StreamingContext context)
: base(info, context) { }
}
/// <summary>
/// The exception that is thrown when a client has not authenticated with the server and
/// attempts to call a method which can only be called when authenticated.
/// </summary>
[Serializable]
public class NotAuthenticatedException : Exception {
/// <summary>
/// Initializes a new instance of the NotAuthenticatedException class
/// </summary>
public NotAuthenticatedException() : base() { }
/// <summary>
/// Initializes a new instance of the NotAuthenticatedException class with its message
/// string set to <paramref name="message"/>.
/// </summary>
/// <param name="message">A description of the error. The content of message is intended
/// to be understood by humans.</param>
public NotAuthenticatedException(string message) : base(message) { }
/// <summary>
/// Initializes a new instance of the NotAuthenticatedException class with its message
/// string set to <paramref name="message"/> and a reference to the inner exception that
/// is the cause of this exception.
/// </summary>
/// <param name="message">A description of the error. The content of message is intended
/// to be understood by humans.</param>
/// <param name="inner">The exception that is the cause of the current exception.</param>
public NotAuthenticatedException(string message, Exception inner) : base(message, inner) { }
/// <summary>
/// Initializes a new instance of the NotAuthenticatedException class with the specified
/// serialization and context information.
/// </summary>
/// <param name="info">An object that holds the serialized object data about the exception
/// being thrown. </param>
/// <param name="context">An object that contains contextual information about the source
/// or destination. </param>
protected NotAuthenticatedException(SerializationInfo info, StreamingContext context)
: base(info, context) { }
}
}