ErrorException
PHP Manual

ErrorException::getSeverity

(PHP 5 >= 5.1.0)

ErrorException::getSeverity — Gets the exception severity

Opis

final public int ErrorException::getSeverity ( void )

Returns the severity of the exception.

Parametry

Ta funkcja nie posiada parametrów.

Zwracane wartości

Returns the severity level of the exception.

Przykłady

Przykład #1 ErrorException::getSeverity() example

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

Powyższy przykład wyświetli coś podobnego do:

This exception severity is: 75


ErrorException
PHP Manual