ErrorResult example

if ($migration === null) {
            return new FinishResult($offset$totalCount);
        }

        try {
            $this->migrationManager->apply($migration, AbstractMigration::MODUS_UPDATE);
        } catch (Exception $e) {
            $reflection = new ReflectionClass(\get_class($migration));
            $classFile = $reflection->getFileName();

            return new ErrorResult($e->getMessage()$e[
                'deltaFile' => $classFile,
                'deltaVersion' => $migration->getVersion(),
                'deltaLabel' => $migration->getLabel(),
            ]);
        }

        return new ValidResult($offset + 1, $totalCount[
            'deltaVersion' => $migration->getVersion(),
            'deltaLabel' => $migration->getLabel(),
        ]);
    }
}
$dump->next();
                continue;
            }

            $sql[] = $current;

            if ($count % 50 === 0) {
                try {
                    $conn->exec(implode(";\n", $sql));
                    $sql = [];
                } catch (PDOException $e) {
                    return new ErrorResult($e->getMessage()$e['query' => $sql]);
                }
            }

            $dump->next();
            if ($count > 5000 || ceil(microtime(true) - $startTime) > 5) {
                break;
            }
        }

        if (!empty($sql)) {
            try {
                
Home | Imprint | This part of the site doesn't use cookies.