Skip to content

Commit

Permalink
Set error catcher only for Pug-php >= 3
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Sep 8, 2019
1 parent 265fd83 commit 98c09b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/PugHandlerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ public function compileWith($path, callable $callback = null)
$compiled . '.imports.serialize.txt',
serialize($importCarrier->getCurrentImportPaths())
);
}

if ($pug->getOption('debug')) {
$contents = "<?php try { ?>$contents<?php } ".
"catch (\Throwable \$exception) { throw new \Bkwld\LaravelPug\PugException(\$this, \$exception); }";
if ($pug->getOption('debug')) {
$contents = "<?php try { ?>$contents<?php } ".
"catch (\Throwable \$exception) { throw new \Bkwld\LaravelPug\PugException(\$this, \$exception); }";
}
}

$this->files->put($compiled, $contents);
Expand Down

0 comments on commit 98c09b1

Please sign in to comment.