ProcessFailedException Class

The exception that IProcessRunner.RunAsync throws when a process exits with a code other than 0 and ProcessRunOptions.ThrowOnNonZeroExitCode is true.

This type is not available in the netstandard and .NET Framework builds of Louis, as ProcessRunner is not.

public class ProcessFailedException : Exception

Remarks

The message of the exception names the exit code and the command line, and nothing else. ProcessFailedException.Result holds the whole text of both streams, for a caller that wants to show more.

Inheritance
Exception ProcessFailedException

Constructors

NameDescription
ProcessFailedException(ProcessResult)Initializes a new instance of the ProcessFailedException class.

ProcessFailedException(ProcessResult)

Available in: net10.0net11.0(not available in the other target frameworks of the package)

Initializes a new instance of the ProcessFailedException class.

public ProcessFailedException(ProcessResult result)

Parameters

result ProcessResult
The outcome of the run.

Exceptions

ArgumentNullException
result is null.

Properties

NameDescription
ResultGets the outcome of the run.

Result

Available in: net10.0net11.0(not available in the other target frameworks of the package)

Gets the outcome of the run.

public ProcessResult Result { get; }

Property value

ProcessResult