more error handling

This commit is contained in:
Shish
2021-11-10 19:33:51 +00:00
parent 4c4b26f098
commit 58db685b29
7 changed files with 27 additions and 16 deletions

View File

@@ -97,7 +97,7 @@ class User
{
$u = User::by_name($name);
if (is_null($u)) {
throw new ScoreException("Can't find any user named $name");
throw new UserDoesNotExist("Can't find any user named $name");
} else {
return $u->id;
}