X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=application%2Fship-simu%2Fexceptions.php;h=d9cc8d9e6d90aa6aa8b1d58895c6f2d6cc103505;hb=4f70843ae8428f051d70ccff5bb43fc4c03dda8d;hp=b5b8bdc9e83632cddc5388abb02678e9fd4a70fa;hpb=6ea47cac34fd28b9d8157ceb1d643f7bfc6a4379;p=shipsimu.git diff --git a/application/ship-simu/exceptions.php b/application/ship-simu/exceptions.php index b5b8bdc..d9cc8d9 100644 --- a/application/ship-simu/exceptions.php +++ b/application/ship-simu/exceptions.php @@ -2,11 +2,11 @@ /** * The exception handler for this application * - * @author Roland Haeder + * @author Roland Haeder * @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 + * @link http://www.shipsimu.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,14 +25,17 @@ // Our own exception handler function __exceptionHandler (FrameworkException $e) { // Call the app_die() method - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s (%s) has been terminated due to a thrown exception: %s [%s]: %s Backtrace:
%s
", - ApplicationHelper::getInstance()->getAppName(), - ApplicationHelper::getInstance()->getAppShortName(), + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s (%s) has terminated due to an uncaught exception: %s [%s]: %s Backtrace:
%s
", + ApplicationHelper::getSelfInstance()->getAppName(), + ApplicationHelper::getSelfInstance()->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: %s, Line: %s, Code: %s, Message: %s", + $message = sprintf("File: %s, Line: %s, Code: %s, Message: %s", basename($errfile), $errline, $errno, @@ -61,7 +64,7 @@ function __assertHandler ($file, $line, $code) { if ($code === "") $code = "Unknown"; // Create message - $message = sprintf("File: %s, Line: %s, Code: %s", + $message = sprintf("File: %s, Line: %s, Code: %s", basename($file), $line, $code