Class KubernetesException
Represents an error message returned by the Kubernetes API server.
Implements
Inherited Members
Namespace: k8s
Assembly: KubernetesClient.dll
Syntax
public class KubernetesException : Exception, ISerializable
Constructors
View SourceKubernetesException()
Initializes a new instance of the KubernetesException class.
Declaration
public KubernetesException()
KubernetesException(string)
Initializes a new instance of the KubernetesException class with an error message.
Declaration
public KubernetesException(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The error message that explains the reason for the exception. |
KubernetesException(string, Exception)
Initializes a new instance of the KubernetesException class with a specified error message and a reference to the inner exception that is the cause of this exception.
Declaration
public KubernetesException(string message, Exception innerException)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The error message that explains the reason for the exception. |
| Exception | innerException | The exception that is the cause of the current exception, or null if no inner exception is specified. |
KubernetesException(V1Status)
Initializes a new instance of the KubernetesException class using the data from a V1Status object.
Declaration
public KubernetesException(V1Status status)
Parameters
| Type | Name | Description |
|---|---|---|
| V1Status | status | A status message which triggered this exception to be thrown. |
KubernetesException(V1Status, Exception)
Initializes a new instance of the KubernetesException class using the data from a V1Status object and a reference to the inner exception that is the cause of this exception..
Declaration
public KubernetesException(V1Status status, Exception innerException)
Parameters
| Type | Name | Description |
|---|---|---|
| V1Status | status | A status message which triggered this exception to be thrown. |
| Exception | innerException | The exception that is the cause of the current exception, or null if no inner exception is specified. |
Properties
View SourceStatus
Gets, when this exception was raised because of a Kubernetes status message, the underlying Kubernetes status message.
Declaration
public V1Status Status { get; }
Property Value
| Type | Description |
|---|---|
| V1Status |