From: Brion Vibber Date: Tue, 26 Jul 2011 22:56:04 +0000 (-0700) Subject: issue #3261 -- fix generic exception handler to pass through generic exception info... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2967c5c0fa8fc14483da3d735fdfbd557a1c359c;p=quix0rs-gnu-social.git issue #3261 -- fix generic exception handler to pass through generic exception info, as already done for exceptions happening within an action. This fixes things like addPlugin() failures being hidden with a generic message. If any email issues remain, they should be treated specifically if special treatment is needed. --- diff --git a/index.php b/index.php index 3534739bfa..850208c9d1 100644 --- a/index.php +++ b/index.php @@ -116,16 +116,14 @@ function handleError($error) common_config('site', 'name'), common_config('site', 'email') ); + + $dac = new DBErrorAction($msg, 500); + $dac->showPage(); } else { - // TRANS: Error message. - $msg = _('An important error occured, probably related to email setup. '. - 'Check logfiles for more info.' - ); + $sac = new ServerErrorAction($error->getMessage(), 500, $error); + $sac->showPage(); } - $dac = new DBErrorAction($msg, 500); - $dac->showPage(); - } catch (Exception $e) { // TRANS: Error message. echo _('An error occurred.');