48 $request = Request::createFromGlobals();
50 'Cache-Control' =>
'no-store, must-revalidate',
51 'Expires' =>
'Fri, 05 Feb 1982 00:00:00 -0500',
65 if (!$app || !$app->internal_services) {
66 $msg =
"Exception loading Elgg core. Check log at time {$exception->timestamp}";
75 $services = $app->internal_services;
76 if ($services->responseFactory->getSentResponse() !== null) {
83 $exception_include = $services->config->exception_include;
85 if ($exception_include && is_file($exception_include)) {
89 include $exception_include;
91 $exception_output = ob_get_clean();
95 if (!empty($exception_output)) {
110 if ($services->request->isXmlHttpRequest()) {
111 $services->views->setViewtype(
'json');
114 $services->views->setViewtype(
'failsafe');
131 $this->
log(LogLevel::CRITICAL, $e);
133 $msg =
"Fatal error in exception handler. Check log for Exception at time $timestamp";
Handler for uncaught exceptions.
static $_instance
Reference to the loaded Application.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Updates the basic settings for the primary site object.
trait Loggable
Enables adding a logger.
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
elgg_view_page(string $title, string|array $body, string $page_shell= 'default', array $vars=[])
Assembles and outputs a full page.
static isCli()
Is application running in CLI.
Thrown when there is a major problem with the installation.
log($level, $message, array $context=[])
Log a message.
__invoke($exception)
Intercepts, logs, and displays uncaught exceptions.
const ELGG_HTTP_INTERNAL_SERVER_ERROR
const ELGG_HTTP_TEMPORARY_REDIRECT