ThinkPHP5


think\exception\ErrorException
library\think\exception\ErrorException.php at line 22

Class ErrorException

\Exception
└─Exception
└─ErrorException

public class ErrorException
extends Exception

ThinkPHP错误异常 主要用于封装 set_error_handler 和 register_shutdown_function 得到的错误 除开从 think\Exception 继承的功能 其他和PHP系统\ErrorException功能基本一样


Constructor Summary
void

__construct(integer severity, string message, string file, integer line, array context)

错误异常构造函数

Method Summary
final integer

getSeverity()

获取错误级别

Methods inherited from think\Exception
getData, setData

Constructor Detail

library\think\exception\ErrorException.php at line 38

__construct

public void __construct(integer severity, string message, string file, integer line, array context)

错误异常构造函数

Parameters:
severity - 错误级别
message - 错误详细信息
file - 出错文件路径
line - 出错行号
context - 错误上下文,会包含错误触发处作用域内所有变量的数组

Method Detail

library\think\exception\ErrorException.php at line 53

getSeverity

public final integer getSeverity()

获取错误级别

Returns:
错误级别

ThinkPHP5