getHelperPluginManager()->getServiceLocator(); $event = $services->get('application')->getMvcEvent(); $response = $event->getResponse(); $code = $response->getStatusCode(); switch ($code) { case 401: $title = "Not Logged In"; break; case 403: $title = "Not Allowed"; break; case 404: $title = "Page Not Found"; break; default: $title = $response->getReasonPhrase(); } $this->headTitle()->set($title); $this->bodyClass()->append('error'); $this->bodyClass()->append('login-reload'); // only show exception if it is valid and display_exceptions = true if (!isset($display_exceptions) || !$display_exceptions || !isset($exception) || !$exception instanceof \Exception ) { $exception = false; } ?>
' . $this->escapeHtml($exception->getFile()) . ':' . $this->escapeHtml($exception->getLine()) . ''; if ($exception->getMessage()) { echo 'Message:' . '
' . $this->escapeHtml($exception->getMessage()) . ''; } // strip base-path from stack trace (shortens lines) $trace = $this->shortenStackTrace($exception->getTraceAsString()); echo 'Stack:' . '
' . $this->escapeHtml($trace) . ''; $exception = $exception->getPrevious(); } echo '