ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
error.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4try {
5 require_once("Services/Init/classes/class.ilInitialisation.php");
7 $DIC->globalScreen()->tool()->context()->claim()->external();
8 $local_tpl = new ilGlobalTemplate("tpl.main.html", true, true);
9 $local_tpl->addBlockFile("CONTENT", "content", "tpl.error.html");
10 $lng->loadLanguageModule("error");
11 // #13515 - link back to "system" [see ilWebAccessChecker::sendError()]
12 $nd = $tree->getNodeData(ROOT_FOLDER_ID);
13 $txt = $lng->txt('error_back_to_repository');
14 $local_tpl->SetCurrentBlock("ErrorLink");
15 $local_tpl->SetVariable("TXT_LINK", $txt);
16 $local_tpl->SetVariable("LINK", ilUtil::secureUrl(ILIAS_HTTP_PATH . '/ilias.php?baseClass=ilRepositoryGUI&amp;client_id=' . CLIENT_ID));
17 $local_tpl->ParseCurrentBlock();
18
19 ilSession::clear("referer");
20 ilSession::clear("message");
21 $tpl->setContent($local_tpl->get());
22 $tpl->printToStdout();
23} catch (Exception $e) {
24 if (defined('DEVMODE') && DEVMODE) {
25 throw $e;
26 }
27
28 if (!($e instanceof \PDOException)) {
29 die($e->getMessage());
30 }
31}
An exception for terminatinating execution or to throw for unit testing.
special template class to simplify handling of ITX/PEAR
static initILIAS()
ilias initialisation
static clear($a_var)
Unset a value.
static secureUrl($url)
Prepare secure href attribute.
$local_tpl
Definition: error.php:8
$nd
Definition: error.php:12
$txt
Definition: error.php:13
$lng
$tpl
Definition: error.php:11
$DIC
Definition: xapitoken.php:46