• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/engine/binder.php
  • Класс: BitrixMainEngineBinder
  • Вызов: Binder::processException
private function processException($exception)
{
	if (!($exception instanceof TypeError) && !($exception instanceof ErrorException))
	{
		return;
	}

	if (
		mb_stripos($exception->getMessage(), 'must be an instance of') === false ||
		mb_stripos($exception->getMessage(), 'null given') === false
	)
	{
		throw $exception;
	}

	$message = $this->extractParameterClassName($exception->getMessage());

	throw new ObjectNotFoundException(
		"Could not find value for class {{$message}} to build auto wired argument",
		$exception instanceof TypeError? null : $exception //fix it. When we will use php7.1
	);
}