function ThrowableUtils::getSeverity
2 calls to ThrowableUtils::getSeverity()
- ErrorHandler::handleException in vendor/
symfony/ error-handler/ ErrorHandler.php - Handles an exception by logging then forwarding it to another handler.
- ErrorHandler::setLoggers in vendor/
symfony/ error-handler/ ErrorHandler.php - Sets a logger for each error level.
File
-
vendor/
symfony/ error-handler/ ThrowableUtils.php, line 21
Class
- ThrowableUtils
- @internal
Namespace
Symfony\Component\ErrorHandlerCode
public static function getSeverity(SilencedErrorContext|\Throwable $throwable) : int {
if ($throwable instanceof \ErrorException || $throwable instanceof SilencedErrorContext) {
return $throwable->getSeverity();
}
if ($throwable instanceof \ParseError) {
return \E_PARSE;
}
if ($throwable instanceof \TypeError) {
return \E_RECOVERABLE_ERROR;
}
return \E_ERROR;
}