]> git.mxchange.org Git - admin.git/blobdiff - index.php
Documentation tag fixed for method detectCorePath() (all projects)
[admin.git] / index.php
index 4cef375d4e157428a51840175e9bfe3114948aff..8b912d836af1095186617da6dcecac74a26b237f 100644 (file)
--- a/index.php
+++ b/index.php
@@ -132,29 +132,35 @@ final class ApplicationEntryPoint {
                                $templateInstance->assignApplicationData($appInstance);
                        } // END - if
 
-                       // 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();
+                       // 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());
+                       }
 
                        // Good bye...
                        exit();
@@ -170,7 +176,7 @@ final class ApplicationEntryPoint {
         * Determines the correct absolute path for all includes only once per run.
         * Other calls of this method are being "cached".
         *
-        * @return      $basePath       Base path (core) for all includes
+        * @return      $corePath       Base path (core) for all includes
         */
        protected static function detectCorePath () {
                // Is it not set?