From e7a71e36b77d9979f3797bc299fa4f1c378d62f6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 9 Jan 2015 09:01:54 +0100 Subject: [PATCH] In multiple catch blocks you can always specify the same variable in each block as it will be reinitialized in the next block. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- index.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index 76e4cfe716..3289d29b34 100644 --- a/index.php +++ b/index.php @@ -317,14 +317,14 @@ function main() } else { try { call_user_func("$action_class::run", $args); - } catch (ClientException $cex) { - $cac = new ClientErrorAction($cex->getMessage(), $cex->getCode()); + } catch (ClientException $e) { + $cac = new ClientErrorAction($e->getMessage(), $e->getCode()); $cac->showPage(); - } catch (ServerException $sex) { // snort snort guffaw - $sac = new ServerErrorAction($sex->getMessage(), $sex->getCode(), $sex); + } catch (ServerException $e) { // snort snort guffaw + $sac = new ServerErrorAction($e->getMessage(), $e->getCode(), $e); $sac->showPage(); - } catch (Exception $ex) { - $sac = new ServerErrorAction($ex->getMessage(), 500, $ex); + } catch (Exception $e) { + $sac = new ServerErrorAction($e->getMessage(), 500, $e); $sac->showPage(); } } -- 2.39.5