public Task <CommandReturnCodes> RunAsync() { try { return(DoRunAsync()); } catch (Exception e) { _logger.LogError("Error:"); for (; e != null; e = e.InnerException) { _logger.LogError(" {0}", e.Message); } return(Task.FromResult(CommandReturnCodes.Fail)); } }
public Task <CommandReturnCodes> RunAsync() { try { return(DoRunAsync()); } catch (Exception e) { for (; e != null; e = e.InnerException) { _logger.LogError("Unexpected exception while running commands:" + e.Message); } return(Task.FromResult(CommandReturnCodes.Fail)); } }