getseverity
ErrorException::getSeverity
Gets the exception severity
ENTITY
final
public
int
ErrorException::getSeverity
Returns the severity of the exception.
ENTITY ENTITY
ENTITY
Returns the severity level of the exception.
ENTITY
ErrorException::getSeverity example
<?php
try {
throw new ErrorException("Exception message", 0, E_USER_ERROR);
} catch(ErrorException $e) {
echo "This exception severity is: " . $e->getSeverity();
var_dump($e->getSeverity() === E_USER_ERROR);
}
?>
ENTITY
This exception severity is: 256
bool(true)
这篇文档对你有帮助吗?
谢谢你的反馈!