function ErrorHandler::throwAt
Sets the PHP error levels that throw an exception when a PHP error occurs.
Parameters
int $levels A bit field of E_* constants for thrown errors:
bool $replace Replace or amend the previous value:
File
-
vendor/
symfony/ error-handler/ ErrorHandler.php, line 296
Class
- ErrorHandler
- A generic ErrorHandler for the PHP engine.
Namespace
Symfony\Component\ErrorHandlerCode
public function throwAt(int $levels, bool $replace = false) : int {
$prev = $this->thrownErrors;
$this->thrownErrors = ($levels | \E_RECOVERABLE_ERROR | \E_USER_ERROR) & ~\E_USER_DEPRECATED & ~\E_DEPRECATED;
if (!$replace) {
$this->thrownErrors |= $prev;
}
$this->reRegister($prev | $this->loggedErrors);
return $prev;
}