system/Debug/Exceptions.php
public function errorHandler(int $severity, string $message, string $file = null, int $line = null, $context = null)
	{
		if (! (error_reporting() & $severity))
		{
			return;
		}

		// Convert it to an exception and pass it along.
		throw new ErrorException($message, 0, $severity, $file, $line);
	}
public function errorHandler(int $severity, string $message, string $file = null, int $line = null, $context = null)
	{
		if (! (error_reporting() & $severity))
		{
			return;
		}

		// Convert it to an exception and pass it along.
		throw new ErrorException($message, 0, $severity, $file, $line);
	}
Even in PHP7, some errors make it through to the errorHandler, so
convert these to Exceptions and let the exception handler log it and
display it.

This seems to be primarily when a user triggers it with trigger_error().

@param integer      $severity
@param string       $message
@param string|null  $file
@param integer|null $line
@param null         $context

@throws \ErrorException