mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
添加Error异常的ErrorContext参数,并打印ErrorContext到异常页面
This commit is contained in:
@@ -33,14 +33,17 @@ class ErrorException extends Exception
|
||||
* @param string $message 错误详细信息
|
||||
* @param string $file 出错文件路径
|
||||
* @param integer $line 出错行号
|
||||
* @param array $context 错误上下文,会包含错误触发处作用域内所有变量的数组
|
||||
*/
|
||||
public function __construct($severity, $message, $file, $line)
|
||||
public function __construct($severity, $message, $file, $line, $context)
|
||||
{
|
||||
$this->severity = $severity;
|
||||
$this->message = $message;
|
||||
$this->file = $file;
|
||||
$this->line = $line;
|
||||
$this->code = 0;
|
||||
|
||||
empty($context) || $this->setData('Error Context', $context);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user