• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/engine/yandexexception.php
  • Класс: BitrixSeoEngineYandexException
  • Вызов: YandexException::__construct
public function __construct($queryResult, Exception $previous = NULL)
{
//		exception use two classes - new and old. Define them
	if ($queryResult)
	{
		if ($queryResult instanceof CHTTP)
		{
			$this->result = $queryResult->result;
			$this->status = $queryResult->status;
		}
		elseif ($queryResult instanceof WebHttpClient)
		{
			$this->result = $queryResult->getResult();
			$this->status = $queryResult->getStatus();
		}
	}
	
	if (!$queryResult)
	{
		parent::__construct('no result', 0, $previous);
	}
	elseif ($this->parseError())
	{
		$this->formatMessage();	//format and try translate message
		parent::__construct($this->message, $this->status, $previous);
	}
	else
	{
		parent::__construct($this->result, $this->status, $previous);
	}
}