ContainerExecException Class

Thrown by ExecResult.EnsureSuccess when a command executed inside a container exits with a non-zero exit code.

public sealed class ContainerExecException : Exception
Inheritance
Exception ContainerExecException

Constructors

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

ContainerExecException overloads

ContainerExecException()

ContainerExecException.cs

Initializes a new instance of ContainerExecException.

public ContainerExecException()

ContainerExecException(string)

ContainerExecException.cs

Initializes a new instance of ContainerExecException with the specified message.

public ContainerExecException(string message)
Parameters
message string
The message.

ContainerExecException(string, Exception)

ContainerExecException.cs

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

public ContainerExecException(string message, Exception innerException)
Parameters
message string
The message.
innerException Exception
The inner exception.

Properties

NameDescription
CommandGets the command and its arguments.
ExitCodeGets the exit code of the command.
StandardErrorGets the text the command wrote to the standard error.
StandardOutputGets the text the command wrote to the standard output.

Gets the command and its arguments.

public IReadOnlyList<string> Command { get; }

Property value

IReadOnlyList<string>

Gets the exit code of the command.

public int ExitCode { get; }

Property value

int

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