Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
httpexceptionhandleroutput.php
1<?php
2namespace Bitrix\Main\Diag;
3
5
6Main\Localization\Loc::loadMessages(__FILE__);
7
9{
16 public function renderExceptionMessage($exception, $debug = false)
17 {
18 $response = new Main\HttpResponse();
19 $response->setStatus('500 Internal Server Error');
20 $response->writeHeaders();
21
22 if ($debug)
23 {
24 echo ExceptionHandlerFormatter::format($exception, true);
25 }
26 else
27 {
28 $p = Main\IO\Path::convertRelativeToAbsolute("/error.php");
29 if (Main\IO\File::isFileExists($p))
30 {
31 include($p);
32 }
33 else
34 {
35 $application = Main\Application::getInstance();
36 if ($application)
37 {
38 echo Main\Localization\Loc::getMessage("eho_render_exception_message");
39 }
40 else
41 {
42 echo "A error occurred during execution of this script. You can turn on extended error reporting in .settings.php file.";
43 }
44 }
45 }
46 }
47}
static format($exception, $htmlMode=false, $level=0)