• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/httpapplication.php
  • Класс: BitrixMainHttpApplication
  • Вызов: HttpApplication::run
public function run()
{
	try
	{
		$router = new Router($this->context->getRequest());

		/** @var Controller $controller */
		/** @var string $actionName */
		[$controller, $actionName] = $router->getControllerAndAction();
		if (!$controller)
		{
			throw new SystemException('Could not find controller for the request', self::EXCEPTION_UNKNOWN_CONTROLLER);
		}

		$this->runController($controller, $actionName);
	}
	catch (Throwable $e)
	{
		$errorCollection = new ErrorCollection();

		$this->processRunError($e, $errorCollection);
		$this->finalizeControllerResult($controller ?? null, null, $errorCollection);
	}
}