Esempio n. 1
0
 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));
     }
 }
Esempio n. 2
0
 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));
     }
 }