Copyright updated, menu class added for 'home'
[shipsimu.git] / application / ship-simu / exceptions.php
index b5b8bdc9e83632cddc5388abb02678e9fd4a70fa..ef9e8452af8e6b6a537ecfb159e650a994275b16 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, 2009 Ship-Simu Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
 // Our own exception handler
 function __exceptionHandler (FrameworkException $e) {
        // Call the app_die() method
-       ApplicationEntryPoint::app_die(sprintf("[Main:] The application <strong>%s</strong> (<strong>%s</strong>) has been terminated due to a thrown exception: <span id=\"exception_name\">%s</span> <span id=\"exception_number\">[%s]</span>: <span id=\"debug_exception\">%s</span> Backtrace: <div id=\"debug_backtrace\">%s</div>",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> (<span class=\"app_short_name\">%s</span>) has terminated due to an uncaught exception: <span class=\"exception_name\">%s</span> <span class=\"exception_number\">[%s]</span>: <span class=\"debug_exception\">%s</span> Backtrace: <div class=\"debug_backtrace\">%s</div>",
                ApplicationHelper::getInstance()->getAppName(),
                ApplicationHelper::getInstance()->getAppShortName(),
                $e->__toString(),
                $e->getHexCode(),
                $e->getMessage(),
                $e->getPrintableBackTrace()
-       ));
+       ),
+               $e->getHexCode(),
+               $e->getExtraData()
+       );
 } // END - function
 
 // Set the new handler
@@ -41,7 +44,7 @@ set_exception_handler('__exceptionHandler');
 // Error handler
 function __errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext) {
        // Construct the message
-       $message = sprintf("File: <span id=\"debug_file\">%s</span>, Line: <span id=\"debug_line\">%s</span>, Code: <span id=\"debug_code\">%s</span>, Message: <span id=\"debug_message\">%s</span>",
+       $message = sprintf("File: <span class=\"debug_file\">%s</span>, Line: <span class=\"debug_line\">%s</span>, Code: <span class=\"debug_code\">%s</span>, Message: <span class=\"debug_message\">%s</span>",
                basename($errfile),
                $errline,
                $errno,
@@ -61,7 +64,7 @@ function __assertHandler ($file, $line, $code) {
        if ($code === "") $code = "<em>Unknown</em>";
 
        // Create message
-       $message = sprintf("File: <span id=\"debug_file\">%s</span>, Line: <span id=\"debug_line\">%s</span>, Code: <span id=\"debug_code\">%s</span>",
+       $message = sprintf("File: <span class=\"debug_file\">%s</span>, Line: <span class=\"debug_line\">%s</span>, Code: <span class=\"debug_code\">%s</span>",
                basename($file),
                $line,
                $code