public WhenAnExceptionIsThrownFromDeadEventSubscirption() { var bus = new EventBus(); bus.Error += (s, e) => errorEvent = e; bus.Subscribe <EventBus.DeadEvent>(e => throw new Exception("Error: " + e.Event)); bus.Publish("Badger"); }
public WhenAnExceptionIsThrownFromASubscription() { var bus = new EventBus(); bus.Error += (s, e) => errorEvent = e; bus.Subscribe <string>(s => raisedEvents.Add("Before " + s)); bus.Subscribe <string>(s => throw new Exception("Error: " + s)); bus.Subscribe <string>(s => raisedEvents.Add("After " + s)); bus.Publish("Badger"); }