Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
httpexceptionhandleroutput.php
1
<?php
2
namespace
Bitrix\Main\Diag
;
3
4
use
Bitrix\Main
;
5
6
Main\Localization\Loc::loadMessages(__FILE__);
7
8
class
HttpExceptionHandlerOutput
implements
IExceptionHandlerOutput
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
}
Bitrix\Main\Diag\ExceptionHandlerFormatter\format
static format($exception, $htmlMode=false, $level=0)
Definition
exceptionhandlerformatter.php:20
Bitrix\Main\Diag\HttpExceptionHandlerOutput
Definition
httpexceptionhandleroutput.php:9
Bitrix\Main\Diag\HttpExceptionHandlerOutput\renderExceptionMessage
renderExceptionMessage($exception, $debug=false)
Definition
httpexceptionhandleroutput.php:16
Bitrix\Main\HttpResponse
Definition
httpresponse.php:8
Bitrix\Main\Diag\IExceptionHandlerOutput
Definition
iexceptionhandleroutput.php:5
Bitrix\Main\Diag
Definition
cachetracker.php:2
Bitrix\Main\IO
Definition
directory.php:2
Bitrix\Main
modules
main
lib
diag
httpexceptionhandleroutput.php
Создано системой
1.10.0