ErrorException
PHP 手册

ErrorException::getSeverity

(PHP 5 >= 5.1.0)

ErrorException::getSeverityGets the exception severity

说明

final public int ErrorException::getSeverity ( void )

Returns the severity of the exception.

参数

This function has no parameters.

返回值

Returns the severity level of the exception.

范例

Example #1 ErrorException() example

<?php
try {
    throw new 
ErrorException("Exception message"075);
} catch(
ErrorException $e) {
    echo 
"This exception severity is: " $e->getSeverity();
}
?>

上例的输出类似于:

This exception severity is: 75


ErrorException
PHP 手册