Exception -> \Exception

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4657 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2018-10-29 14:14:42 +00:00
parent fc56c52628
commit 67a8f982cc
2 changed files with 9 additions and 9 deletions

View File

@@ -12,7 +12,7 @@ class authsession extends auth
function __construct ()
{
if (!isset ($_SESSION))
throw new Exception ("No session previously opened", 401);
throw new \Exception ("No session previously opened", 401);
}
/** No connection to session */
@@ -29,11 +29,11 @@ class authsession extends auth
{
if (!isset ($_SESSION["domframework"]["auth"]["email"]) ||
!isset ($_SESSION["domframework"]["auth"]["password"]))
throw new Exception ("No previous email in session", 401);
throw new \Exception ("No previous email in session", 401);
if ($_SESSION["domframework"]["auth"]["email"] !== $email)
throw new Exception ("Unable to authenticate user '$email'", 401);
throw new \Exception ("Unable to authenticate user '$email'", 401);
if ($_SESSION["domframework"]["auth"]["password"] !== $password)
throw new Exception ("Bad password for '$email'", 401);
throw new \Exception ("Bad password for '$email'", 401);
}
/** Return all the parameters recorded for the authenticate user */
@@ -55,7 +55,7 @@ class authsession extends auth
*/
public function changepassword ($oldpassword, $newpassword)
{
throw new Exception (dgettext("domframework",
throw new \Exception (dgettext("domframework",
"The password can't be change for SESSION users"),
405);
}
@@ -68,7 +68,7 @@ class authsession extends auth
*/
public function overwritepassword ($email, $newpassword)
{
throw new exception (dgettext("domframework",
throw new \Exception (dgettext("domframework",
"The password can't be overwrite for SESSION users"),
405);
}

View File

@@ -18,7 +18,7 @@ class ratelimit
*/
public function set ($name)
{
throw new Exception (dgettext("domframework",
throw new \Exception (dgettext("domframework",
"ratelimit : no valid ratelimiter available"),
500);
}
@@ -29,7 +29,7 @@ class ratelimit
*/
public function del ($name)
{
throw new Exception (dgettext("domframework",
throw new \Exception (dgettext("domframework",
"ratelimit : no valid ratelimiter available"),
500);
}
@@ -39,7 +39,7 @@ class ratelimit
*/
public function clean ()
{
throw new Exception (dgettext("domframework",
throw new \Exception (dgettext("domframework",
"ratelimit : no valid ratelimiter available"),
500);
}