]> git.mxchange.org Git - mailer.git/blobdiff - inc/classes/exceptions/template/class_UnexpectedTemplateTypeException.php
0.3.0 inital import
[mailer.git] / inc / classes / exceptions / template / class_UnexpectedTemplateTypeException.php
diff --git a/inc/classes/exceptions/template/class_UnexpectedTemplateTypeException.php b/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]
+?>