UnsupportedCommandTypeException example

$this->validateCondition(null, $command$writeException$event->getContext());

                continue;
            }

            if ($command instanceof UpdateCommand) {
                $updateQueue[] = $command;

                continue;
            }

            throw new UnsupportedCommandTypeException($command);
        }

        if (!empty($updateQueue)) {
            $this->validateUpdateCommands($updateQueue$writeException$event->getContext());
        }
    }

    private function validateCondition(
        ?RuleConditionEntity $condition,
        WriteCommand $command,
        WriteException $writeException,
        


                        continue;
                    }

                    if ($command instanceof InsertCommand) {
                        $inserts->addInsert($definition->getEntityName()$command->getPayload());

                        continue;
                    }

                    throw new UnsupportedCommandTypeException($command);
                } catch (\Exception $e) {
                    $command->setFailed(true);

                    $innerException = $this->exceptionHandlerRegistry->matchException($e);

                    if ($innerException instanceof \Exception) {
                        $e = $innerException;
                    }
                    $context->getExceptions()->add($e);

                    throw $e;
                }
Home | Imprint | This part of the site doesn't use cookies.