-
Notifications
You must be signed in to change notification settings - Fork 31
/
KubeClientException.cs
71 lines (61 loc) · 2.01 KB
/
KubeClientException.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
using HTTPlease;
using System;
#if NETSTANDARD2_0
using System.Runtime.Serialization;
#endif // NETSTANDARD2_0
namespace KubeClient
{
using Models;
/// <summary>
/// Exception raised when an error is encountered by the Kubernetes API client.
/// </summary>
#if NETSTANDARD20
[Serializable]
#endif // NETSTANDARD20
public class KubeClientException
: Exception
{
/// <summary>
/// The default exception message used when no message was available.
/// </summary>
public static readonly string DefaultMessage = "An unexpected error has occurred (error description is not available).";
/// <summary>
/// Create a new <see cref="KubeClientException"/>.
/// </summary>
/// <param name="message">
/// The exception message.
/// </param>
public KubeClientException(string message)
: base(message)
{
}
/// <summary>
/// Create a new <see cref="KubeClientException"/>, as caused by a previous exception.
/// </summary>
/// <param name="message">
/// The exception message.
/// </param>
/// <param name="innerException">
/// The exception that caused the <see cref="KubeClientException"/> to be raised.
/// </param>
public KubeClientException(string message, Exception innerException)
: base(message, innerException)
{
}
#if NETSTANDARD2_0
/// <summary>
/// Deserialisation constructor.
/// </summary>
/// <param name="info">
/// The serialisation data store.
/// </param>
/// <param name="context">
/// A <see cref="StreamingContext"/> containing information about the origin of the serialised data.
/// </param>
protected KubeClientException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
#endif // NETSTANDARD2_0
}
}