Commit f12316f2 by Carsten Brandt

file and line information missing from error array representation

parent cb87d7be
...@@ -127,6 +127,8 @@ class ErrorHandler extends \yii\base\ErrorHandler ...@@ -127,6 +127,8 @@ class ErrorHandler extends \yii\base\ErrorHandler
$array['status'] = $exception->statusCode; $array['status'] = $exception->statusCode;
} }
if (YII_DEBUG) { if (YII_DEBUG) {
$array['file'] = $exception->getFile();
$array['line'] = $exception->getLine();
$array['stack-trace'] = explode("\n", $exception->getTraceAsString()); $array['stack-trace'] = explode("\n", $exception->getTraceAsString());
if ($exception instanceof \yii\db\Exception) { if ($exception instanceof \yii\db\Exception) {
$array['error-info'] = $exception->errorInfo; $array['error-info'] = $exception->errorInfo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment