]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
In multiple catch blocks you can always specify the same variable in each block
authorRoland Häder <haeder@hmmdeutschland.de>
Fri, 9 Jan 2015 08:01:54 +0000 (09:01 +0100)
committerRoland Häder <haeder@hmmdeutschland.de>
Fri, 9 Jan 2015 08:01:54 +0000 (09:01 +0100)
as it will be reinitialized in the next block.

Signed-off-by: Roland Häder <haeder@hmmdeutschland.de>
index.php

index 76e4cfe71623d3d320b2739aa76aafdb6eba740b..3289d29b34215858c738024713ecd09ac696fe31 100644 (file)
--- 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();
         }
     }