mirror of
https://github.com/standardebooks/web.git
synced 2025-07-09 16:20:27 -04:00
Refactor HttpInput::Str and rename some exceptions for consistency
This commit is contained in:
parent
2b5f4f55a2
commit
ca3fc6dbfd
54 changed files with 163 additions and 159 deletions
|
@ -64,7 +64,7 @@ class Session extends PropertiesBase{
|
|||
|
||||
self::SetSessionCookie($this->SessionId);
|
||||
}
|
||||
catch(Exceptions\InvalidUserException){
|
||||
catch(Exceptions\UserNotFoundException){
|
||||
throw new InvalidLoginException();
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ class Session extends PropertiesBase{
|
|||
|
||||
public static function Get(?string $sessionId): Session{
|
||||
if($sessionId === null){
|
||||
throw new Exceptions\InvalidSessionException();
|
||||
throw new Exceptions\SessionNotFoundException();
|
||||
}
|
||||
|
||||
$result = Db::Query('
|
||||
|
@ -105,7 +105,7 @@ class Session extends PropertiesBase{
|
|||
', [$sessionId], 'Session');
|
||||
|
||||
if(sizeof($result) == 0){
|
||||
throw new Exceptions\InvalidSessionException();
|
||||
throw new Exceptions\SessionNotFoundException();
|
||||
}
|
||||
|
||||
return $result[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue