X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=application%2Fselector%2Fexceptions.php;fp=application%2Fselector%2Fexceptions.php;h=1a93fc0f40263b94ede8938f1417f1f96b738bb6;hp=d9cc8d9e6d90aa6aa8b1d58895c6f2d6cc103505;hb=03739dab08a3c99ecb781f37fee0fc24d0d059d5;hpb=b9ea3b382bbe4ece196f0e3e054f1a61c77cfb7a diff --git a/application/selector/exceptions.php b/application/selector/exceptions.php index d9cc8d9..1a93fc0 100644 --- a/application/selector/exceptions.php +++ b/application/selector/exceptions.php @@ -24,8 +24,8 @@ // Our own exception handler function __exceptionHandler (FrameworkException $e) { - // Call the app_die() method - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s (%s) has terminated due to an uncaught exception: %s [%s]: %s Backtrace:
%s
", + // Call the app_exit() method + ApplicationEntryPoint::app_exit(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(), @@ -44,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,10 +61,12 @@ set_error_handler('__errorHandler'); // Assertion handler function __assertHandler ($file, $line, $code) { // Empty code? - if ($code === "") $code = "Unknown"; + if (empty($code)) { + $code = 'Unknown'; + } // END - if // Create message - $message = sprintf("File: %s, Line: %s, Code: %s", + $message = sprintf('File: %s, Line: %s, Code: %s', basename($file), $line, $code