Merge pull request #26688 from nextcloud/enh/better-share-exceptiondebug

pull/27196/head
John Molakvoæ 4 years ago committed by GitHub
commit b585cf1ea1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      lib/private/Share20/DefaultShareProvider.php
  2. 14
      lib/public/Share/Exceptions/ShareNotFound.php

@ -222,7 +222,7 @@ class DefaultShareProvider implements IShareProvider {
$cursor->closeCursor();
if ($data === false) {
throw new ShareNotFound();
throw new ShareNotFound('Newly created share could not be found');
}
$mailSendValue = $share->getMailSend();

@ -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);
}
}

Loading…
Cancel
Save