From e3fa68682dc7f6c154f6ccedaab311ef4be82804 Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Thu, 22 Apr 2021 08:48:25 +0200 Subject: 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(+) (limited to 'lib/public/Share') diff --git a/lib/public/Share/Exceptions/ShareNotFound.php b/lib/public/Share/Exceptions/ShareNotFound.php index 6e4dd2677ae..66827b4d179 100644 --- a/lib/public/Share/Exceptions/ShareNotFound.php +++ b/lib/public/Share/Exceptions/ShareNotFound.php @@ -27,4 +27,18 @@ namespace OCP\Share\Exceptions; * @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); + } } -- cgit v1.2.3