]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/template/class_BaseTemplateEngine.php
Code cleanups, deprecated classes renamed
[core.git] / inc / classes / main / template / class_BaseTemplateEngine.php
index 8a58b46d1d6d4d2c4f1950861087b4a9d19a24fe..c8924f7a1a820c1290d374e7e12bc62564b532d8 100644 (file)
@@ -523,7 +523,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         * @param       $template       The template we shall load
         * @param       $extOther       An other extension to use
         * @return      void
-        * @throws      FileNotFoundException   If the template was not found
+        * @throws      FileIoException If the template was not found
         */
        protected function loadTemplate ($template, $extOther = '') {
                // Get extension for the template if empty
@@ -550,7 +550,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                try {
                        // Load the raw template data
                        $this->loadRawTemplateData($fqfn);
-               } catch (FileNotFoundException $e) {
+               } catch (FileIoException $e) {
                        // If we shall load a code-template we need to switch the file extension
                        if (($this->getTemplateType() != $this->getConfigInstance()->getConfigEntry('web_template_type')) && (empty($extOther))) {
                                // Switch over to the code-template extension and try it again
@@ -560,7 +560,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                                $this->loadTemplate($template, $ext);
                        } else {
                                // Throw it again
-                               throw new FileNotFoundException($fqfn, FrameworkFileInputPointer::EXCEPTION_FILE_NOT_FOUND);
+                               throw new FileIoException($fqfn, FrameworkFileInputPointer::EXCEPTION_FILE_NOT_FOUND);
                        }
                }
 
@@ -689,10 +689,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                                                // Remember this template for recursion detection
                                                // RECURSIVE PROTECTION!
                                                $this->loadedTemplates[] = $template;
-                                       } catch (FileNotFoundException $e) {
-                                               // Even this is not done... :/
-                                               $this->rawTemplates[] = $template;
-                                       } catch (FilePointerNotOpenedException $e) {
+                                       } catch (FileIoException $e) {
                                                // Even this is not done... :/
                                                $this->rawTemplates[] = $template;
                                        }
@@ -791,10 +788,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                                        // Remember this template for recursion detection
                                        // RECURSIVE PROTECTION!
                                        $this->loadedTemplates[] = $template;
-                               } catch (FileNotFoundException $e) {
-                                       // This template was never found. We silently ignore it
-                                       unset($this->rawTemplates[$key]);
-                               } catch (FilePointerNotOpenedException $e) {
+                               } catch (FileIoException $e) {
                                        // This template was never found. We silently ignore it
                                        unset($this->rawTemplates[$key]);
                                }