Add exception class MDTemporarilyUnavailableException

This commit is contained in:
jrenslin committed 2026-08-03 12:41:23 +02:00
1 parent fc6ac5e31c
commit f772b55d1e
2 files changed
+19

No files matched your search

+1
View File
@@ -37,6 +37,7 @@ public static function categorizeError(Throwable $exception):MDErrorCategory {
|| $exception instanceof MDMysqliExpectedError || $exception instanceof MDMysqliExpectedError
|| $exception instanceof MDcouldNotSetPublic || $exception instanceof MDcouldNotSetPublic
|| $exception instanceof MDInvalidNodaLink || $exception instanceof MDInvalidNodaLink
|| $exception instanceof MDTemporarilyUnavailableException
) { ) {
return MDErrorCategory::known; return MDErrorCategory::known;
} }
@@ -0,0 +1,18 @@
<?PHP
declare(strict_types = 1);
/**
* Custom exception class for presenting that a functionality is currently unavailable.
*/
final class MDTemporarilyUnavailableException extends Exception {
/**
* Error message.
*
* @return string
*/
public function errorMessage() {
//error message
return 'This functionality is currently unavailable';
}
}