From 2967c5c0fa8fc14483da3d735fdfbd557a1c359c Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 26 Jul 2011 15:56:04 -0700 Subject: [PATCH] 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. --- index.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/index.php b/index.php index 3534739bfa..850208c9d1 100644 --- a/index.php +++ b/index.php @@ -116,15 +116,13 @@ function handleError($error) common_config('site', 'name'), common_config('site', 'email') ); - } else { - // TRANS: Error message. - $msg = _('An important error occured, probably related to email setup. '. - 'Check logfiles for more info.' - ); - } - $dac = new DBErrorAction($msg, 500); - $dac->showPage(); + $dac = new DBErrorAction($msg, 500); + $dac->showPage(); + } else { + $sac = new ServerErrorAction($error->getMessage(), 500, $error); + $sac->showPage(); + } } catch (Exception $e) { // TRANS: Error message.