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);
    }
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);
    }
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 ) ; }
Publish failed response event.

@param string        $eventClass
@param string        $errorMessage
@param KernelContext $context

@return \Generator
Publish failed response event .