From 601d04736325741933e5161b5ad45bb98e471c22 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 18 Dec 2008 02:07:36 +0000 Subject: [PATCH] Applications should terminate due to an uncatched exception --- application/selector/exceptions.php | 2 +- application/selector/starter.php | 13 +------------ application/ship-simu/exceptions.php | 2 +- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/application/selector/exceptions.php b/application/selector/exceptions.php index fd41c37..e332850 100644 --- a/application/selector/exceptions.php +++ b/application/selector/exceptions.php @@ -25,7 +25,7 @@ // 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 a thrown exception: %s [%s]: %s Backtrace:
%s
", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s (%s) has terminated due to an uncatched exception: %s [%s]: %s Backtrace:
%s
", ApplicationHelper::getInstance()->getAppName(), ApplicationHelper::getInstance()->getAppShortName(), $e->__toString(), diff --git a/application/selector/starter.php b/application/selector/starter.php index dde690e..64ac807 100644 --- a/application/selector/starter.php +++ b/application/selector/starter.php @@ -47,18 +47,7 @@ if ((empty($app)) || (is_null($app))) { } // Call the entry point method -try { - // Call user function - call_user_func_array(array($app, FrameworkConfiguration::getInstance()->readConfig('entry_method')), array()); -} catch (FrameworkException $e) { - die($e->getMessage()); - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s has been terminated due to a thrown exception: %s - %s", - $application, - $e->__toString(), - $e->getMessage() - )); -} - +call_user_func_array(array($app, FrameworkConfiguration::getInstance()->readConfig('entry_method')), array()); // [EOF] ?> diff --git a/application/ship-simu/exceptions.php b/application/ship-simu/exceptions.php index fd41c37..e332850 100644 --- a/application/ship-simu/exceptions.php +++ b/application/ship-simu/exceptions.php @@ -25,7 +25,7 @@ // 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 a thrown exception: %s [%s]: %s Backtrace:
%s
", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s (%s) has terminated due to an uncatched exception: %s [%s]: %s Backtrace:
%s
", ApplicationHelper::getInstance()->getAppName(), ApplicationHelper::getInstance()->getAppShortName(), $e->__toString(), -- 2.39.2