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
This commit is contained in:
2015-08-07 09:46:30 +00:00
parent be7085fd68
commit ca9af5324e

View File

@@ -419,6 +419,10 @@ class route
else else
$getCode = $e->getCode (); $getCode = $e->getCode ();
$message = $e->getMessage ();
if ($e->getCode () === 0)
$message .= "<p>The Exception code was 0 and converted to 500</p>\n";
// If an error class/method is defined, use it in place of the default // If an error class/method is defined, use it in place of the default
// one. // one.
// The errors must be defined in an array("class", "method"); // The errors must be defined in an array("class", "method");
@@ -431,7 +435,7 @@ class route
"the method in an array\n"); "the method in an array\n");
$a = new $this->errors[0]; $a = new $this->errors[0];
$method = $this->errors[1]; $method = $this->errors[1];
$a->$method ($getCode, $e->getMessage()); $a->$method ($getCode, $message);
exit; exit;
} }
@@ -447,7 +451,7 @@ class route
echo " </head>\n"; echo " </head>\n";
echo" <body>\n"; echo" <body>\n";
echo "<h1>".$http->codetext ($getCode)."</h1>"; echo "<h1>".$http->codetext ($getCode)."</h1>";
echo $e->getMessage(); echo $message;
echo" </body>\n"; echo" </body>\n";
echo "</html>\n"; echo "</html>\n";
exit; exit;