mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-08-30 12:45:32 +08:00
补全 Db、Debug、Env、Error、Exception、File、Hook、Lang、Loader、Log 类的文档,调整代码样式
This commit is contained in:
@@ -13,15 +13,13 @@ namespace think;
|
||||
|
||||
class Exception extends \Exception
|
||||
{
|
||||
|
||||
/**
|
||||
* 保存异常页面显示的额外Debug数据
|
||||
* @var array
|
||||
* @var array 保存异常页面显示的额外 Debug 数据
|
||||
*/
|
||||
protected $data = [];
|
||||
|
||||
/**
|
||||
* 设置异常额外的Debug数据
|
||||
* 设置异常额外的 Debug 数据
|
||||
* 数据将会显示为下面的格式
|
||||
*
|
||||
* Exception Data
|
||||
@@ -33,8 +31,10 @@ class Exception extends \Exception
|
||||
* key1 value1
|
||||
* key2 value2
|
||||
*
|
||||
* @param string $label 数据分类,用于异常页面显示
|
||||
* @param array $data 需要显示的数据,必须为关联数组
|
||||
* @access protected
|
||||
* @param string $label 数据分类,用于异常页面显示
|
||||
* @param array $data 需要显示的数据,必须为关联数组
|
||||
* @return void
|
||||
*/
|
||||
final protected function setData($label, array $data)
|
||||
{
|
||||
@@ -42,13 +42,14 @@ class Exception extends \Exception
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取异常额外Debug数据
|
||||
* 获取异常额外 Debug 数据
|
||||
* 主要用于输出到异常页面便于调试
|
||||
* @return array 由setData设置的Debug数据
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
final public function getData()
|
||||
{
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user