Class ExecuteException
Thrown by EnsureSuccess(bool) if the executed command did not return a zero exit code.
Namespace: Neon.Common
Assembly: Neon.Common.dll
Syntax
public class ExecuteException : Exception
Constructors
ExecuteException(ExecuteResponse, string)
Constructs an instance from a ExecuteResponse.
Declaration
public ExecuteException(ExecuteResponse response, string message)
Parameters
Type | Name | Description |
---|---|---|
ExecuteResponse | response | The command response. |
string | message | The error message. |
ExecuteException(int, string, string, string)
Constructs an instance explictly passing the exit code and output streams.
Declaration
public ExecuteException(int exitCode, string message, string outputText = null, string errorText = null)
Parameters
Type | Name | Description |
---|---|---|
int | exitCode | The program exit code. |
string | message | The error message. |
string | outputText | Optionally specifies the program standard output text. |
string | errorText | Optionally specifies the program standard error text. |
Properties
ErrorText
Returns the command standard error text.
Declaration
public string ErrorText { get; }
Property Value
Type | Description |
---|---|
string |
ExitCode
Returns the command exit code.
Declaration
public int ExitCode { get; }
Property Value
Type | Description |
---|---|
int |
OutputText
Returns the command standard output text.
Declaration
public string OutputText { get; }
Property Value
Type | Description |
---|---|
string |