3 // An exception class for lost classes... ;-)
4 class MissingArrayElementsException extends FrameworkException {
8 * @param $message Message from the exception
9 * @param $code Code number for the exception
12 public final function __construct ($classArray, $code) {
14 $classArray = (array) $classArray;
16 // Extract all elements
18 if ((isset($classArray[2])) && (is_array($classArray[2]))) {
19 // Convert into strings
20 $elements = implode("</u>, <u>", $classArray[2]);
23 $elements = "invalid_data";
26 // Add a message around the missing class
27 $message = sprintf("[%s:%d] Das Array <u>%s()</u> keine Elemente <u>%s</u> auf!",
28 $classArray[0]->__toString(),
34 // Call parent constructor
35 parent::__construct($message, $code);