$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();