19declare(strict_types=1);
24 require_once
'../vendor/composer/vendor/autoload.php';
26 require_once __DIR__ .
'/../artifacts/bootstrap_default.php';
29 $DIC->globalScreen()->tool()->context()->claim()->external();
31 $lng->loadLanguageModule(
'error');
34 $local_tpl = new \ilGlobalTemplate(
'tpl.error.html',
true,
true);
43 $DIC->http()->saveResponse(
47 ->withHeader(\
ILIAS\
HTTP\Response\ResponseHeader::CONTENT_TYPE,
'text/html')
51 $tpl->printToStdout();
53 $DIC->http()->close();
54}
catch (\Throwable
$e) {
55 if (\defined(
'DEVMODE') && DEVMODE) {
63 if (!headers_sent()) {
64 http_response_code(500);
65 header(
'Content-Type: text/plain; charset=UTF-8');
68 $incident_id = session_id() .
'_' . (new \Random\Randomizer())->getInt(1, 9999);
69 $timestamp = (new \DateTimeImmutable())->setTimezone(
new \DateTimeZone(
'UTC'))->format(
'Y-m-d\TH:i:s\Z');
71 echo
"Internal Server Error\n";
72 echo
"Incident: $incident_id\n";
73 echo
"Timestamp: $timestamp\n";
74 if (
$e instanceof \PDOException) {
75 echo
"Message: A database error occurred. Please contact the system administrator with the incident id.\n";
77 echo
"Message: {$e->getMessage()}\n";
81 "[%s] INCIDENT %s — Uncaught %s: %s in %s:%d\nStack trace:\n%s\n",
88 $e->getTraceAsString()
foreach($mandatory_scripts as $file) $timestamp
static clear(string $a_var)
static secureUrl(string $url)
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
entry_point(string $name)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...