@ -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
public function __construct($message = '', ...$arguments) {
if (empty($message)) {
$message = 'Share not found';
parent::__construct($message, ...$arguments);