private static function publishThrowable(string $eventClass, string $errorMessage, KernelContext $context): \Generator
    {
        /**
         * @noinspection VariableFunctionsUsageInspection
         *
         * @var \ServiceBus\Services\Contracts\ExecutionFailedEvent $event
         */
        $event = \forward_static_call_array([$eventClass, 'create'], [$context->traceId(), $errorMessage]);

        yield $context->delivery($event);
    }