summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/controllers
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-02-02 14:07:11 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2016-02-02 14:07:11 +0100
commit4d7130ad315637b7b7b925efce4032472f4530f8 (patch)
tree67109fe0af7bf51172e08ea88df2f9f9fd449744 /apps/files_sharing/lib/controllers
parentce053b980860070957bedb13e6fcd9d45fe50b9b (diff)
downloadnextcloud-server-4d7130ad315637b7b7b925efce4032472f4530f8.tar.gz
nextcloud-server-4d7130ad315637b7b7b925efce4032472f4530f8.zip
[Share 2.0] Add exceptions to OCP
Diffstat (limited to 'apps/files_sharing/lib/controllers')
-rw-r--r--apps/files_sharing/lib/controllers/sharecontroller.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/controllers/sharecontroller.php b/apps/files_sharing/lib/controllers/sharecontroller.php
index 9fec57edbdd..6ac585e275c 100644
--- a/apps/files_sharing/lib/controllers/sharecontroller.php
+++ b/apps/files_sharing/lib/controllers/sharecontroller.php
@@ -52,6 +52,7 @@ use OCP\Util;
use OCA\Files_Sharing\Activity;
use \OCP\Files\NotFoundException;
use OCP\Files\IRootFolder;
+use OCP\Share\Exceptions\ShareNotFound;
/**
* Class ShareController
@@ -147,7 +148,7 @@ class ShareController extends Controller {
// Check whether share exists
try {
$share = $this->shareManager->getShareByToken($token);
- } catch (\OC\Share20\Exception\ShareNotFound $e) {
+ } catch (ShareNotFound $e) {
return new NotFoundResponse();
}
@@ -203,7 +204,7 @@ class ShareController extends Controller {
// Check whether share exists
try {
$share = $this->shareManager->getShareByToken($token);
- } catch (\OC\Share20\Exception\ShareNotFound $e) {
+ } catch (ShareNotFound $e) {
return new NotFoundResponse();
}