From c6aeec1d2fb40654236a17b5f4f5feb28c7ee0f2 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Fri, 7 Aug 2020 18:06:01 +0200 Subject: [PATCH] Add MDInvalidObjectPublicationBackground.php --- .../MDInvalidObjectPublicationBackground.php | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 exceptions/updates/MDInvalidObjectPublicationBackground.php diff --git a/exceptions/updates/MDInvalidObjectPublicationBackground.php b/exceptions/updates/MDInvalidObjectPublicationBackground.php new file mode 100644 index 0000000..20822d3 --- /dev/null +++ b/exceptions/updates/MDInvalidObjectPublicationBackground.php @@ -0,0 +1,29 @@ + + */ +declare(strict_types = 1); + +/** + * Custom exception class to be raised when trying to use a license that is not + * accepted by museum-digital. + */ +class MDInvalidObjectPublicationBackground extends MDgenericInvalidInputsException { + + /** + * Error message. + * + * @return string + */ + public function errorMessage() { + //error message + $errorMsg = 'The following object publication type is not available: ' . $this->getMessage(); + return $errorMsg; + + } + +}