]> git.mxchange.org Git - shipsimu.git/blobdiff - ship-simu/inc/classes/exceptions/template/class_InvalidTemplateVariableNameException.php
Initial import of current development status
[shipsimu.git] / ship-simu / inc / classes / exceptions / template / class_InvalidTemplateVariableNameException.php
diff --git a/ship-simu/inc/classes/exceptions/template/class_InvalidTemplateVariableNameException.php b/ship-simu/inc/classes/exceptions/template/class_InvalidTemplateVariableNameException.php
new file mode 100644 (file)
index 0000000..dd075ab
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+
+// An exception class for lost classes... ;-)
+class InvalidTemplateVariableNameException extends FrameworkException {
+       /**
+        * The constructor
+        *
+        * @param               $class          An array holding our informations
+        * @param               $code           Code number for the exception
+        * @return      void
+        */
+       public final function __construct ($class, $code) {
+               // Add a message around the missing class
+               $message = sprintf("[%s:%d] Die im Template <u>%s</u> gefundene Variable <u>%s</u> ist nicht g&uuml;ltig! G&uuml;ltige Variablennamen sind nur <u>%s</strong>.",
+                       $class[0]->__toString(),
+                       $this->getLine(),
+                       basename($class[1]),
+                       $class[2],
+                       $class[3]->readConfig("tpl_valid_var")
+               );
+
+               // Call parent constructor
+               parent::__construct($message, $code);
+       }
+}
+
+// [EOF]
+?>