Fixed error reporting
This commit is contained in:
parent
5aff018d11
commit
bf2c8b4010
|
@ -254,9 +254,12 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project) {
|
|||
$route = $utopia->match($request);
|
||||
$template = ($route) ? $route->getLabel('error', null) : null;
|
||||
|
||||
if (php_sapi_name() === 'cli' && $route) {
|
||||
Console::error('[Error] Method: '.$route->getMethod());
|
||||
Console::error('[Error] URL: '.$route->getURL());
|
||||
if (php_sapi_name() === 'cli') {
|
||||
if($route) {
|
||||
Console::error('[Error] Method: '.$route->getMethod());
|
||||
Console::error('[Error] URL: '.$route->getURL());
|
||||
}
|
||||
|
||||
Console::error('[Error] Type: '.get_class($error));
|
||||
Console::error('[Error] Message: '.$error->getMessage());
|
||||
Console::error('[Error] File: '.$error->getFile());
|
||||
|
|
Loading…
Reference in a new issue