$filePath =
$this->productExportFileHandler->
getFilePath($productExport);
if ($this->productExportFileHandler->
isValidFile( $filePath,
$exportBehavior,
$productExport )) { return;
} $result =
$this->productExportGenerator->
generate($productExport,
$exportBehavior);
if (!
$result instanceof ProductExportResult
) { $exportNotGeneratedException =
new ExportNotGeneratedException();
$this->
logException($context->
getContext(),
$exportNotGeneratedException);
throw $exportNotGeneratedException;
} if ($result->
hasErrors()) { $exportInvalidException =
new ExportInvalidException($productExport,
$result->
getErrors());
$this->
logException($context->
getContext(),
$exportInvalidException);
throw $exportInvalidException;
}