1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
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\Application\getInstance
static getInstance()
Определения
application.php:98
Bitrix\Main\Diag\ExceptionHandlerFormatter\format
static format($exception, $htmlMode=false, $level=0)
Определения
exceptionhandlerformatter.php:20
Bitrix\Main\Diag\HttpExceptionHandlerOutput
Определения
httpexceptionhandleroutput.php:9
Bitrix\Main\Diag\HttpExceptionHandlerOutput\renderExceptionMessage
renderExceptionMessage($exception, $debug=false)
Определения
httpexceptionhandleroutput.php:16
Bitrix\Main\HttpResponse
Определения
httpresponse.php:8
Bitrix\Main\IO\Path\convertRelativeToAbsolute
static convertRelativeToAbsolute($relativePath)
Определения
path.php:286
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Определения
loc.php:65
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Определения
loc.php:30
$p
$p
Определения
group_list_element_edit.php:23
Bitrix\Main\Diag\IExceptionHandlerOutput
Определения
iexceptionhandleroutput.php:5
$application
$application
Определения
bitrix.php:23
Bitrix\Main\IO
Определения
directory.php:3
Bitrix\Main
$response
$response
Определения
result.php:21
bitrix
modules
main
lib
diag
httpexceptionhandleroutput.php
Создано системой
1.14.0