Skip to content

Commit 68b30cf

Browse files
authored
ENGCOM-5203: [Backport] Show exception message during SCD failure #23114
2 parents 63dbf2c + 49ae79d commit 68b30cf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/code/Magento/Deploy/Service/DeployPackage.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ function () use ($package, $options, $skipLogging) {
112112
}
113113

114114
/**
115+
* Execute package deploy procedure when area already emulated
116+
*
115117
* @param Package $package
116118
* @param array $options
117119
* @param bool $skipLogging
@@ -141,7 +143,9 @@ public function deployEmulated(Package $package, array $options, $skipLogging =
141143
$this->errorsCount++;
142144
$this->logger->critical($errorMessage);
143145
} catch (\Exception $exception) {
144-
$this->logger->critical($exception->getTraceAsString());
146+
$this->logger->critical(
147+
'Compilation from source ' . $file->getSourcePath() . ' failed' . PHP_EOL . (string)$exception
148+
);
145149
$this->errorsCount++;
146150
}
147151
}
@@ -224,7 +228,9 @@ private function checkIfCanCopy(PackageFile $file, Package $package, Package $pa
224228
private function checkFileSkip($filePath, array $options)
225229
{
226230
if ($filePath !== '.') {
231+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
227232
$ext = strtolower(pathinfo($filePath, PATHINFO_EXTENSION));
233+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
228234
$basename = pathinfo($filePath, PATHINFO_BASENAME);
229235
if ($ext === 'less' && strpos($basename, '_') === 0) {
230236
return true;

0 commit comments

Comments
 (0)