mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 18:42:00 -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
|
@ -85,7 +85,7 @@ class Artist extends PropertiesBase{
|
|||
|
||||
public static function Get(?int $artistId): Artist{
|
||||
if($artistId === null){
|
||||
throw new Exceptions\InvalidArtistException();
|
||||
throw new Exceptions\ArtistNotFoundException();
|
||||
}
|
||||
|
||||
$result = Db::Query('
|
||||
|
@ -95,7 +95,7 @@ class Artist extends PropertiesBase{
|
|||
', [$artistId], 'Artist');
|
||||
|
||||
if(sizeof($result) == 0){
|
||||
throw new Exceptions\InvalidArtistException();
|
||||
throw new Exceptions\ArtistNotFoundException();
|
||||
}
|
||||
|
||||
return $result[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue