]> git.mxchange.org Git - shipsimu.git/blobdiff - index.php
Continued:
[shipsimu.git] / index.php
index 51a9f4758ec3a2fbdf28195223f7046ea98c1062..94177e3062c449faaa117332f0d0fac89dad4038 100644 (file)
--- a/index.php
+++ b/index.php
@@ -62,7 +62,8 @@ final class ApplicationEntryPoint {
                // Is this method already called?
                if (isset($GLOBALS['app_die_called'])) {
                        // Then output the text directly
-                       exit($message);
+                       print $message . PHP_EOL;
+                       exit(255);
                }
 
                // This method shall not be called twice
@@ -80,7 +81,7 @@ final class ApplicationEntryPoint {
                // Do we have debug installation?
                if (($configInstance->getConfigEntry('product_install_mode') == 'productive') || ($silentMode === true)) {
                        // Abort here
-                       exit;
+                       exit(255);
                }
 
                // Get some instances
@@ -173,16 +174,16 @@ final class ApplicationEntryPoint {
                                $responseInstance->flushBuffer();
                        } catch (FileNotFoundException $e) {
                                // Even the template 'emergency_exit' wasn't found so output both message
-                               exit($message . ', exception: ' . $e->getMessage());
+                               print ($message . ', exception: ' . $e->getMessage() . PHP_EOL);
+                               exit($e->getCode());
                        }
 
                        // Good bye...
-                       exit;
+                       exit(255);
                } else {
                        // Output message and die
-                       die(sprintf('[Main:] Emergency exit reached: <span class="emergency_span">%s</span>',
-                               $message
-                       ));
+                       printf('[Main:] Emergency exit reached: <span class="emergency_span">%s</span>', $message);
+                       exit(255);
                }
        }