/
vshmidt
/
masstransit
Обзор
Документация
Войти
/
vshmidt
/
masstransit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/MassTransit/Events/ReceiveFaultEvent.cs
39 строк
1 KB
Chris Patterson
AggregateException should be recognized by the ExceptionFilter and properly inspected to determine if an exception should be handled or ignored.
11 июн 2025, 20:33
11 июн 2025, 20:33
5dcd785
Код
Авторство
О чём код?
namespace MassTransit.Events { using System; using System.Linq; [Serializable] public class ReceiveFaultEvent : ReceiveFault { public ReceiveFaultEvent() { } public ReceiveFaultEvent(HostInfo host, Exception exception, string contentType, Guid? faultedMessageId, string[] faultMessageTypes) { Timestamp = DateTime.UtcNow; FaultId = NewId.NextGuid(); Host = host; ContentType = contentType; FaultedMessageId = faultedMessageId; FaultMessageTypes = faultMessageTypes; var aggregateException = exception as AggregateException; Exceptions = aggregateException?.InnerExceptions.Select(ExceptionInfo (x) => new FaultExceptionInfo(x)).ToArray() ?? [new FaultExceptionInfo(exception)]; } public Guid FaultId { get; set; } public DateTime Timestamp { get; set; } public Guid? FaultedMessageId { get; set; } public ExceptionInfo[] Exceptions { get; set; } public HostInfo Host { get; set; } public string[] FaultMessageTypes { get; set; } public string ContentType { get; set; } } }