Add cancel

This commit is contained in:
2017-01-26 08:36:54 -05:00
parent 295b40bed8
commit 4338b4fee5
30 changed files with 333 additions and 62 deletions
+14
View File
@@ -1,13 +1,27 @@
using System;
using LeafWeb.Core.Utility;
using Renci.SshNet;
namespace LeafWeb.Core.Remote
{
public class PiscalClientException : Exception
{
public int LeafInputId { get; private set; }
public string CommandText { get; private set; }
public PiscalClientException(int leafInputId, string error) : base(error)
{
LeafInputId = leafInputId;
}
public PiscalClientException(int leafInputId, SshCommand command) : base(
!string.IsNullOrEmpty(command.Error)
? command.Error.TrimEndNewLine()
: command.Result.TrimEndNewLine()
)
{
LeafInputId = leafInputId;
CommandText = command.CommandText;
}
}
}