Skip to content

Commit 658a30a

Browse files
committed
Moved exception to be thrown one level up
1 parent c18602c commit 658a30a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

setup/src/Magento/Setup/Module/Di/Compiler/Log/Log.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,15 @@ public function add($type, $key, $message = '')
8181
* Write entries
8282
*
8383
* @return void
84+
* @throws \Magento\Framework\Validator\Exception
8485
*/
8586
public function report()
8687
{
8788
$this->_successWriter->write($this->_successEntries);
8889
$this->_errorWriter->write($this->_errorEntries);
90+
if (count($this->_errorEntries) > 0) {
91+
throw new \Magento\Framework\Validator\Exception(__('Error during compilation'));
92+
}
8993
}
9094

9195
/**

setup/src/Magento/Setup/Module/Di/Compiler/Log/Writer/Console.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public function write(array $data)
7070

7171
if ($errorsCount) {
7272
$this->console->writeln('<error>' . 'Total Errors Count: ' . $errorsCount . '</error>');
73-
throw new \Magento\Framework\Validator\Exception(__('Error durring compilation'));
7473
}
7574
}
7675

0 commit comments

Comments
 (0)