From ca9af5324e34b5329ecfb0843e1340c9a8aa65d0 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Fri, 7 Aug 2015 09:46:30 +0000 Subject: [PATCH] route : add a message to errors when the Exception code is 0 and converted to 500 git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2221 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- route.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/route.php b/route.php index 5d6acbe..6566f94 100644 --- a/route.php +++ b/route.php @@ -419,6 +419,10 @@ class route else $getCode = $e->getCode (); + $message = $e->getMessage (); + if ($e->getCode () === 0) + $message .= "

The Exception code was 0 and converted to 500

\n"; + // If an error class/method is defined, use it in place of the default // one. // The errors must be defined in an array("class", "method"); @@ -431,7 +435,7 @@ class route "the method in an array\n"); $a = new $this->errors[0]; $method = $this->errors[1]; - $a->$method ($getCode, $e->getMessage()); + $a->$method ($getCode, $message); exit; } @@ -447,7 +451,7 @@ class route echo " \n"; echo" \n"; echo "

".$http->codetext ($getCode)."

"; - echo $e->getMessage(); + echo $message; echo" \n"; echo "\n"; exit;