From eedc05d365f1437d2b16a17a3af73fd14389c806 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Fri, 19 May 2023 18:10:57 +0200 Subject: [PATCH] Add new exception MDUploadTooLargeException --- .../updates/MDUploadTooLargeException.php | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 exceptions/updates/MDUploadTooLargeException.php diff --git a/exceptions/updates/MDUploadTooLargeException.php b/exceptions/updates/MDUploadTooLargeException.php new file mode 100644 index 0000000..ffa983f --- /dev/null +++ b/exceptions/updates/MDUploadTooLargeException.php @@ -0,0 +1,25 @@ + + */ +declare(strict_types = 1); + +/** + * Custom exception class for wrongly used files. + */ +final class MDUploadTooLargeException extends Exception { + /** + * Error message. + * + * @return string + */ + public function errorMessage() { + //error message + return 'This file\'s extension or mimetype is incorrect: ' . $this->getMessage(); + + } +}