|
34 | 34 | use OCP\Files\IRootFolder; |
35 | 35 | use OCP\Files\Node; |
36 | 36 | use OCP\Files\NotFoundException; |
| 37 | +use OCP\HintException; |
37 | 38 | use OCP\IConfig; |
38 | 39 | use OCP\IDateTimeZone; |
39 | 40 | use OCP\IGroupManager; |
|
46 | 47 | use OCP\Lock\LockedException; |
47 | 48 | use OCP\Mail\IMailer; |
48 | 49 | use OCP\Server; |
49 | | -use OCP\Share\Exceptions\GenericShareException; |
50 | 50 | use OCP\Share\Exceptions\ShareNotFound; |
51 | 51 | use OCP\Share\IManager; |
52 | 52 | use OCP\Share\IProviderFactory; |
@@ -810,7 +810,7 @@ public function createShare( |
810 | 810 |
|
811 | 811 | try { |
812 | 812 | $share = $this->shareManager->createShare($share); |
813 | | - } catch (GenericShareException $e) { |
| 813 | + } catch (HintException $e) { |
814 | 814 | $code = $e->getCode() === 0 ? 403 : $e->getCode(); |
815 | 815 | throw new OCSException($e->getHint(), $code); |
816 | 816 | } catch (\Exception $e) { |
@@ -1351,7 +1351,7 @@ public function updateShare( |
1351 | 1351 |
|
1352 | 1352 | try { |
1353 | 1353 | $share = $this->shareManager->updateShare($share); |
1354 | | - } catch (GenericShareException $e) { |
| 1354 | + } catch (HintException $e) { |
1355 | 1355 | $code = $e->getCode() === 0 ? 403 : $e->getCode(); |
1356 | 1356 | throw new OCSException($e->getHint(), (int)$code); |
1357 | 1357 | } catch (\Exception $e) { |
@@ -1439,7 +1439,7 @@ public function acceptShare(string $id): DataResponse { |
1439 | 1439 |
|
1440 | 1440 | try { |
1441 | 1441 | $this->shareManager->acceptShare($share, $this->currentUser); |
1442 | | - } catch (GenericShareException $e) { |
| 1442 | + } catch (HintException $e) { |
1443 | 1443 | $code = $e->getCode() === 0 ? 403 : $e->getCode(); |
1444 | 1444 | throw new OCSException($e->getHint(), (int)$code); |
1445 | 1445 | } catch (\Exception $e) { |
|
0 commit comments