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

@ -1,8 +1,6 @@
<?php declare(strict_types=1);
/**
* Class SCoreException
*
* A base exception to be caught by the upper levels.
*/
class SCoreException extends RuntimeException
@ -34,8 +32,6 @@ class InstallerException extends RuntimeException
}
/**
* Class PermissionDeniedException
*
* A fairly common, generic exception.
*/
class PermissionDeniedException extends SCoreException
@ -43,16 +39,19 @@ class PermissionDeniedException extends SCoreException
}
/**
* Class ImageDoesNotExist
*
* This exception is used when an Image cannot be found by ID.
*
* Example: Image::by_id(-1) returns null
*/
class ImageDoesNotExist extends SCoreException
{
}
/**
* This exception is used when a User cannot be found by some criteria.
*/
class UserDoesNotExist extends SCoreException
{
}
/*
* For validate_input()
*/