ErrorException::getSeverity
(PHP 5 >= 5.1.0)
ErrorException::getSeverity — 获取异常的严重程度
说明
final public int ErrorException::getSeverity( void)
返回异常的严重程度。
参数
此函数没有参数。
返回值
返回异常的严重级别。
范例
Example #1 ErrorException::getSeverity() 例子
<?php
try {
throw new ErrorException("Exception message", 0, 75);
} catch(ErrorException $e) {
echo "This exception severity is: " . $e->getSeverity();
}
?>
以上例程的输出类似于:
This exception severity is: 75
发表评论 取消回复