Beispiel #1
0
        public Task Handle(MessageProcessingExceptionContext <TSource> context)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            return(InvokeHandler(context));
        }
Beispiel #2
0
 private async Task InvokeHandler(MessageProcessingExceptionContext <TSource> context)
 {
     try
     {
         await _handler.Invoke(context);
     }
     catch (Exception handlerError)
     {
         Trace.TraceError(handlerError.ToString());
     }
 }
Beispiel #3
0
 private async Task HandleException(MessageProcessingExceptionContext <TSource> context)
 {
     foreach (IMessageProcessingExceptionHandler <TSource> handler in _handlers)
     {
         try
         {
             await handler.Handle(context);
         }
         catch (Exception handlerError)
         {
             Trace.TraceError(handlerError.ToString());
         }
     }
 }