ErrorException::getSeverity

(PHP 5 >= 5.1.0, PHP 7)
Gets the exception severity
final public int ErrorException::getSeverity ( void )

Returns the severity of the exception.

Returns:

Returns the severity level of the exception.

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

The above example will output something similar to:

This exception severity is: 75
doc_php
2016-02-24 15:53:29
Comments
Leave a Comment

Please login to continue.