]> git.mxchange.org Git - shipsimu.git/blobdiff - ship-simu/inc/classes/exceptions/template/class_UnexpectedTemplateTypeException.php
Initial import of current development status
[shipsimu.git] / ship-simu / inc / classes / exceptions / template / class_UnexpectedTemplateTypeException.php
diff --git a/ship-simu/inc/classes/exceptions/template/class_UnexpectedTemplateTypeException.php b/ship-simu/inc/classes/exceptions/template/class_UnexpectedTemplateTypeException.php
new file mode 100644 (file)
index 0000000..7021f37
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+
+// An exception class for lost classes... ;-)
+class UnexpectedTemplateTypeException 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] Der Template-Typ <u>%s</u> entspricht nicht dem erwartetem Template-Typ <u>%s</u>.",
+                       $class[0]->__toString(),
+                       $this->getLine(),
+                       $class[1],
+                       $class[2]
+               );
+
+               // Call parent constructor
+               parent::__construct($message, $code);
+       }
+}
+
+// [EOF]
+?>