Skip to content
Permalink
Browse files

CLI renderer should use inner exception for PHP7ErrorException instan…

…ces to keep original stacktrace
  • Loading branch information...
jippi committed Aug 4, 2016
1 parent 4ff1c3e commit 321308191902dd051d03169af1603066d2f03a5b
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/Console/ConsoleErrorHandler.php
@@ -16,6 +16,7 @@
use Cake\Error\BaseErrorHandler;
use Cake\Error\FatalErrorException;
use Cake\Error\PHP7ErrorException;
use Exception;
/**
@@ -83,6 +84,11 @@ protected function _displayException($exception)
if ($exception instanceof FatalErrorException) {
$errorName = 'Fatal Error:';
}
if ($exception instanceof PHP7ErrorException) {
$exception = $exception->getError();
}
$message = sprintf(
"<error>%s</error> %s in [%s, line %s]",
$errorName,

0 comments on commit 3213081

Please sign in to comment.
You can’t perform that action at this time.