From 39ce16f72d9f02ada9740a4b6207491f88a68ae3 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Sun, 16 Apr 2023 02:06:43 +0200 Subject: [PATCH] Add exception class MDInvalidNodaLink --- exceptions/updates/MDInvalidNodaLink.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 exceptions/updates/MDInvalidNodaLink.php diff --git a/exceptions/updates/MDInvalidNodaLink.php b/exceptions/updates/MDInvalidNodaLink.php new file mode 100644 index 0000000..13308b6 --- /dev/null +++ b/exceptions/updates/MDInvalidNodaLink.php @@ -0,0 +1,24 @@ + + */ +declare(strict_types = 1); + +/** + * Custom exception class to be raised when trying to use a language that is not + * accepted by museum-digital. + */ +final class MDInvalidNodaLink extends Exception { + /** + * Error message. + * + * @return string + */ + public function errorMessage() { + //error message + return 'The noda link is not valid: ' . $this->getMessage(); + + } +}