mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-26 03:30:32 +08:00
file and line information missing from error array representation
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user