类 MissingDocumentException
当找不到文档时引发的异常。
属性概要
-
$_attributes protected
数组
从构造函数传入并可在显示开发错误时在视图中使用的属性数组。
-
$_defaultCode protected
int
默认异常代码
-
$_messageTemplate protected
字符串
将属性 sprintf() 注入其中的模板字符串。
方法概要
-
__construct() public
构造函数。
-
getAttributes() public
获取传入的属性
方法详情
__construct() ¶ public
__construct(array|string $message = '', int|null $code = null, Throwable|null $previous = null)
构造函数。
允许您创建被视为框架错误并在调试模式关闭时禁用的异常。
参数
-
数组|字符串
$message 可选 错误消息字符串,或者在视图中可用并被 sprintf() 注入 Exception::$_messageTemplate 中的属性数组
-
int|null
$code 可选 错误代码
-
Throwable|null
$previous 可选 之前的异常。