4
我看到这个代码在PHP documentation:什么是异常严重的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);
}
它继续:
This exception severity is: 256
bool(true)
什么异常的严重性意味着,和我必须在所有使用它呢?