mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Merge pull request #26688 from nextcloud/enh/better-share-exceptiondebug
This commit is contained in:
commit
b585cf1ea1
2 changed files with 15 additions and 1 deletions
|
|
@ -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…
Reference in a new issue