]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/exceptions/controller/class_InvalidControllerException.php
More conventions than code added:
[shipsimu.git] / inc / classes / exceptions / controller / class_InvalidControllerException.php
index 4aa54c8e07bdf6266e3695a17ded61e547a36ee0..b166455a12134f55a0e4cbe184e31b9902105911 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -25,18 +25,22 @@ class InvalidControllerException extends FrameworkException {
        /**
         * The super constructor for all exceptions
         *
-        * @param               $msgArray       An array with message parts
-        * @param               $code           An optional code for better debugging
+        * @param       $msgArray       An array with message parts
+        * @param       $code           An optional code for better debugging
         * @return      void
         */
        public function __construct(array $msgArray, $code) {
                // Prepare the message
-               $message = sprintf("[%s:%d] Cannot resolve controller <span id=\"exception_reason\">%s</span>.",
+               $message = sprintf("[%s:%d] Cannot resolve controller <span id=\"exception_reason\">%s (class name: %s)</span>.",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
-                       $msgArray[1]
+                       $msgArray[1],
+                       $msgArray[0]->getClassName()
                );
 
+               // Set extra data
+               $this->setExtraData($msgArray[0]->getClassName().":".$this->getLine());
+
                // Call parent contructor with message
                parent::__construct($message, $code);
        }