+ $backtrace .= sprintf("<span class=\"backtrace_file\">%s</span>:%d, <span class=\"backtrace_function\">%s(%d)</span><br />\n",
+ basename($trace['file']),
+ $trace['line'],
+ $trace['function'],
+ count($trace['args'])
+ );
+ } // END - foreach
+
+ // Init application instance
+ $applicationInstance = null;
+
+ // Is the class there?
+ if (class_exists('ApplicationHelper')) {
+ // Get application instance
+ $applicationInstance = ApplicationHelper::getInstance();
+
+ // Assign application data
+ $templateInstance->assignApplicationData($applicationInstance);
+ } // END - if
+
+ // We only try this
+ try {
+ // Assign variables
+ $templateInstance->assignVariable('message', $message);
+ $templateInstance->assignVariable('code', $code);
+ $templateInstance->assignVariable('extra', $extraData);
+ $templateInstance->assignVariable('backtrace', $backtrace);
+ $templateInstance->assignVariable('total_includes', ClassLoader::getInstance()->getTotal());
+ $templateInstance->assignVariable('total_objects', ObjectFactory::getTotal());
+ $templateInstance->assignVariable('title', $languageInstance->getMessage('emergency_exit_title'));
+
+ // Load the template
+ $templateInstance->loadCodeTemplate('emergency_exit');
+
+ // Compile the template
+ $templateInstance->compileTemplate();
+
+ // Compile all variables
+ $templateInstance->compileVariables();
+
+ // Transfer data to response
+ $templateInstance->transferToResponse($responseInstance);
+
+ // Flush the response
+ $responseInstance->flushBuffer();
+ } catch (FileIoException $e) {
+ // Even the template 'emergency_exit' wasn't found so output both message
+ die($message . ', exception: ' . $e->getMessage());