public CommandReturnCodes Run() { try { return(DoRun()); } catch (Exception e) { _logger.LogError("Error:"); for (; e != null; e = e.InnerException) { _logger.LogError(" {0}", e.Message); } return(CommandReturnCodes.Fail); } }
public async Task <CommandReturnCodes> RunAsync() { try { return(await DoRunAsync()); } catch (Exception e) { _logger.LogError("Error:"); for (; e != null; e = e.InnerException) { _logger.LogError(" {0}", e.Message); } return(CommandReturnCodes.Fail); } }