Skip to content

Commit

Permalink
Fix #73 Throw PugException only if facade/ignition is installed
Browse files Browse the repository at this point in the history
Fix Laravel < 6 errors display compatibility
  • Loading branch information
kylekatarnls committed Sep 20, 2019
1 parent b281580 commit 8854d79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PugHandlerTrait.php
Expand Up @@ -235,7 +235,7 @@ public function compileWith($path, callable $callback = null)
serialize($importCarrier->getCurrentImportPaths())
);

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

0 comments on commit 8854d79

Please sign in to comment.