From c7af1dc1444c82084c73b5ea3a9077e15aadcaf6 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Tue, 11 Aug 2020 22:57:15 +0200 Subject: [PATCH] Add MDInvalidInputDate --- exceptions/updates/MDInvalidInputDate.php | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 exceptions/updates/MDInvalidInputDate.php diff --git a/exceptions/updates/MDInvalidInputDate.php b/exceptions/updates/MDInvalidInputDate.php new file mode 100644 index 0000000..37a8193 --- /dev/null +++ b/exceptions/updates/MDInvalidInputDate.php @@ -0,0 +1,29 @@ + + */ +declare(strict_types = 1); + +/** + * Custom exception class to be raised when trying to use a currency that is not + * accepted by museum-digital. + */ +class MDInvalidInputDate extends Exception { + + /** + * Error message. + * + * @return string + */ + public function errorMessage() { + //error message + $errorMsg = 'The following currency is not available: ' . $this->getMessage(); + return $errorMsg; + + } + +}