From 3612a1097ad1636b09240f7d11e3cd7e45cc94f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Thu, 22 Apr 2021 08:48:25 +0200 Subject: [PATCH] Default message for ShareNotFound exception MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- lib/public/Share/Exceptions/ShareNotFound.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/public/Share/Exceptions/ShareNotFound.php b/lib/public/Share/Exceptions/ShareNotFound.php index 12cdbf4fd9cb7..790b11be95acc 100644 --- a/lib/public/Share/Exceptions/ShareNotFound.php +++ b/lib/public/Share/Exceptions/ShareNotFound.php @@ -28,4 +28,18 @@ * @since 9.0.0 */ class ShareNotFound extends GenericShareException { + + /** + * @param string $message + * @param string $hint + * @param int $code + * @param \Exception|null $previous + * @since 9.0.0 + */ + public function __construct($message = '', ...$arguments) { + if (empty($message)) { + $message = 'Share not found'; + } + parent::__construct($message, ...$arguments); + } }