diff --git a/vendor/magento/framework/Setup/Patch/PatchApplier.php b/vendor/magento/framework/Setup/Patch/PatchApplier.php index 1bc0b03..9a0708e 100644 --- a/vendor/magento/framework/Setup/Patch/PatchApplier.php +++ b/vendor/magento/framework/Setup/Patch/PatchApplier.php @@ -153,10 +153,17 @@ new Phrase("Patch %1 should implement DataPatchInterface", [get_class($dataPatch)]) ); } + echo date('c') . ' - ' . get_class($dataPatch); if ($dataPatch instanceof NonTransactionableInterface) { - $dataPatch->apply(); + echo ' - NonTransactionableInterface' . "\n"; + try { + $dataPatch->apply(); + } catch (\Exception $e) { + throw new Exception(new Phrase('[' . get_class($dataPatch) . '] -- ' . $e->getMessage())); + } $this->patchHistory->fixPatch(get_class($dataPatch)); } else { + echo ' - DataPatchInterface' . "\n"; try { $this->moduleDataSetup->getConnection()->beginTransaction(); $dataPatch->apply(); @@ -239,6 +246,7 @@ /** * @var SchemaPatchInterface $schemaPatch */ + echo date('c') . ' - ' . ((is_object($schemaPatch) ? get_class($schemaPatch) : $schemaPatch)) . "\n"; $schemaPatch = $this->patchFactory->create($schemaPatch, ['schemaSetup' => $this->schemaSetup]); $schemaPatch->apply(); $this->patchHistory->fixPatch(get_class($schemaPatch)); @@ -247,11 +255,12 @@ } } } catch (\Exception $e) { + echo $e->getMessage() . "\n"; throw new SetupException( new Phrase( 'Unable to apply patch %1 for module %2. Original exception message: %3', [ - get_class($schemaPatch), + (is_object($schemaPatch) ? get_class($schemaPatch) : $schemaPatch), $moduleName, $e->getMessage() ]