fixed: throw exception

This commit is contained in:
Philipp Lang 2022-11-10 15:02:13 +01:00
parent 92f3e62abb
commit 68d4f38e31
1 changed files with 6 additions and 0 deletions

View File

@ -25,6 +25,12 @@ abstract class BaseCompiler implements Responsable
}
exec($this->command($document), $output, $returnVar);
if (0 !== $returnVar) {
Log::error('Compilation failed', ['body' => $contents, 'output' => $output, 'dir' => $this->file->getPath(), 'command' => $this->command($document)]);
throw (new CompilerException('Compilation failed.'))->setOutput($output);
}
$this->refreshFile();
if (!$this->file->isFile()) {