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

            return(InvokeHandler(context));
        }
Esempio n. 2
0
 private async Task InvokeHandler(MessageProcessingExceptionContext <TSource> context)
 {
     try
     {
         await _handler.Invoke(context);
     }
     catch (Exception handlerError)
     {
         Trace.TraceError(handlerError.ToString());
     }
 }
Esempio n. 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());
         }
     }
 }