Skip to content

Commit

Permalink
Display ParseError even if xdebug is not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Mar 26, 2018
1 parent 90ec027 commit db22d7d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Phug/Renderer/Partial/Debug/DebuggerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,15 @@ public function handleError($error, $code, $path, $source, $parameters, $options
$handler = $options['error_handler'];
if (!$handler) {
// @codeCoverageIgnoreStart
if ($options['debug'] && $options['html_error']) {
echo $exception->getMessage();
exit(1);
if ($options['debug']) {
if ($options['html_error']) {
echo $exception->getMessage();
exit(1);
}
if (!function_exists('xdebug_is_enabled') || !xdebug_is_enabled()) {
echo $exception->getMessage()."\n".$exception->getTraceAsString();
exit(1);
}
}
// @codeCoverageIgnoreEnd
throw $exception;
Expand Down

0 comments on commit db22d7d

Please sign in to comment.