• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/httpapplication.php
  • Класс: BitrixMainHttpApplication
  • Вызов: HttpApplication::processRunError
private function processRunError(Throwable $e, ErrorCollection $errorCollection): void
{
	$errorCollection[] = new Error($e->getMessage(), $e->getCode());
	$exceptionHandling = Configuration::getValue('exception_handling');
	$debugMode = !empty($exceptionHandling['debug']);
	if ($debugMode)
	{
		$errorCollection[] = new Error(DiagExceptionHandlerFormatter::format($e));
		if ($e->getPrevious())
		{
			$errorCollection[] = new Error(DiagExceptionHandlerFormatter::format($e->getPrevious()));
		}
	}

	if ($debugMode || $this->shouldWriteToLogException($e))
	{
		$this->getExceptionHandler()->writeToLog($e);
	}
}