ContainerRuntimeException Class

Thrown when the container runtime fails an operation: its command line exits with a non-zero exit code, or the Docker Engine API refuses a request or reports a failure. Every runtime reports its failures with this exception.

public sealed class ContainerRuntimeException : Exception
Inheritance
Exception ContainerRuntimeException

Constructors

NameDescription
ContainerRuntimeException()Initializes a new instance of ContainerRuntimeException.
ContainerRuntimeException(string)Initializes a new instance of ContainerRuntimeException with the specified message.
ContainerRuntimeException(string, Exception)Initializes a new instance of ContainerRuntimeException with the specified message and inner exception.

ContainerRuntimeException overloads

ContainerRuntimeException()

ContainerRuntimeException.cs

Initializes a new instance of ContainerRuntimeException.

public ContainerRuntimeException()

ContainerRuntimeException(string)

ContainerRuntimeException.cs

Initializes a new instance of ContainerRuntimeException with the specified message.

public ContainerRuntimeException(string message)
Parameters
message string

ContainerRuntimeException(string, Exception)

ContainerRuntimeException.cs

Initializes a new instance of ContainerRuntimeException with the specified message and inner exception.

public ContainerRuntimeException(string message, Exception innerException)
Parameters
message string
innerException Exception

Properties

NameDescription
CommandGets the command line that failed, or null when the operation did not run a command line. Environment variable values are redacted.
ExitCodeGets the exit code of the command, or 0 when the operation did not run a command line.
RuntimeGets the runtime whose operation failed.
StandardErrorGets the text the command wrote to the standard error.
StandardOutputGets the text the command wrote to the standard output.
StatusCodeGets the status of the Docker Engine API response that refused the request, or null when the failure was not reported by a response status: a command line that failed, or an operation the daemon reported as failed in the body of a successful response.

Gets the command line that failed, or null when the operation did not run a command line. Environment variable values are redacted.

public string? Command { get; }

Property value

string?

Gets the exit code of the command, or 0 when the operation did not run a command line.

public int ExitCode { get; }

Property value

int

Gets the runtime whose operation failed.

public ContainerRuntime? Runtime { get; }

Property value

ContainerRuntime?

Gets the text the command wrote to the standard error.

public string? StandardError { get; }

Property value

string?

Gets the text the command wrote to the standard output.

public string? StandardOutput { get; }

Property value

string?

Gets the status of the Docker Engine API response that refused the request, or null when the failure was not reported by a response status: a command line that failed, or an operation the daemon reported as failed in the body of a successful response.

public HttpStatusCode? StatusCode { get; }

Property value

HttpStatusCode?