SimpleExec
ExitCodeException.cs
using System;
namespace SimpleExec
{
///
/// The command exited with an unexpected exit code.
///
#pragma warning disable CA1032 // Implement standard exception constructors
public clast ExitCodeException : Exception
#pragma warning restore CA1032 // Implement standard exception constructors
{
///
/// Constructs an instance of a .
///
/// The exit code of the command.
public ExitCodeException(int exitCode) => this.ExitCode = exitCode;
///
/// Gets the exit code of the command.
///
public int ExitCode { get; }
///
public override string Message => $"The command exited with code {this.ExitCode}.";
}
}