0.3.0 inital import
[mailer.git] / inc / classes / exceptions / main / class_DimNotFoundInArrayException.php
diff --git a/inc/classes/exceptions/main/class_DimNotFoundInArrayException.php b/inc/classes/exceptions/main/class_DimNotFoundInArrayException.php
new file mode 100644 (file)
index 0000000..46959d7
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+
+// Unsere eigene Exception!
+class DimNotFoundInArrayException extends FrameworkException {
+       /**
+        * The constructor
+        *
+        * @param               $message                Message from the exception
+        * @param               $code           Code number for the exception
+        * @return      void
+        */
+       public final function __construct ($class, $code) {
+               if (is_object($class)) {
+                       // Add a message around the missing class
+                       $message = sprintf("[%s:%d] Abmasse konnten nicht extrahiert werden!",
+                               $class->__toString(),
+                               $this->getLine()
+                       );
+               } else {
+                       // No class given
+                       $message = sprintf("Please provide a class for <u>%s</u>", __CLASS__);
+               }
+
+               // Call parent constructor
+               parent::__construct($message, $code);
+       }
+}
+
+// [EOF]
+?>