use OCP\Files\IRootFolder;
use OCP\Files\Node;
use OCP\Files\NotFoundException;
+use OCP\HintException;
use OCP\IConfig;
use OCP\IDateTimeZone;
use OCP\IGroupManager;
use OCP\Lock\LockedException;
use OCP\Mail\IMailer;
use OCP\Server;
-use OCP\Share\Exceptions\GenericShareException;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager;
use OCP\Share\IProviderFactory;
try {
$share = $this->shareManager->createShare($share);
- } catch (GenericShareException $e) {
+ } catch (HintException $e) {
$code = $e->getCode() === 0 ? 403 : $e->getCode();
throw new OCSException($e->getHint(), $code);
} catch (\Exception $e) {
try {
$share = $this->shareManager->updateShare($share);
- } catch (GenericShareException $e) {
+ } catch (HintException $e) {
$code = $e->getCode() === 0 ? 403 : $e->getCode();
throw new OCSException($e->getHint(), (int)$code);
} catch (\Exception $e) {
try {
$this->shareManager->acceptShare($share, $this->userId);
- } catch (GenericShareException $e) {
+ } catch (HintException $e) {
$code = $e->getCode() === 0 ? 403 : $e->getCode();
throw new OCSException($e->getHint(), (int)$code);
} catch (\Exception $e) {