private void PublishAndThrow(Exception reason, LogLevel level) { reason.Match().With<EndpointDisassociatedException>(endpoint => PublishDisassociated()) .Default(msg => PublishError(reason, level)); throw reason; }