Beispiel #1
0
 public async Task HandleErrorAsync <TCommand>(ICommandContext <TCommand> context, Exception exception, CommandErrorDelegate <TCommand> next)
     where TCommand : class, ICommand
 {
     try
     {
         await _engine.NotifyFailAsync(context.Message).ConfigureAwait(false);
     }
     catch (Exception discardException)
     {
         _logger.LogError(discardException, ex => $"Unable to discard message: {ex.Message}");
         await next(context, exception).ConfigureAwait(false);
     }
 }
Beispiel #2
0
 public Task HandleErrorAsync <TCommand>(ICommandContext <TCommand> context, Exception exception, CommandErrorDelegate <TCommand> next)
     where TCommand : class, ICommand
 {
     return(_engine.NotifyFailAsync(context.Message));
 }