From 4d7130ad315637b7b7b925efce4032472f4530f8 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 2 Feb 2016 14:07:11 +0100 Subject: [Share 2.0] Add exceptions to OCP --- lib/private/share20/defaultshareprovider.php | 2 +- lib/private/share20/exception/sharenotfound.php | 25 ----------------- lib/private/share20/manager.php | 2 +- .../share/exceptions/genericshareexception.php | 28 +++++++++++++++++++ lib/public/share/exceptions/sharenotfound.php | 32 ++++++++++++++++++++++ 5 files changed, 62 insertions(+), 27 deletions(-) delete mode 100644 lib/private/share20/exception/sharenotfound.php create mode 100644 lib/public/share/exceptions/genericshareexception.php create mode 100644 lib/public/share/exceptions/sharenotfound.php (limited to 'lib') diff --git a/lib/private/share20/defaultshareprovider.php b/lib/private/share20/defaultshareprovider.php index 224dddf4019..7b78be2b61d 100644 --- a/lib/private/share20/defaultshareprovider.php +++ b/lib/private/share20/defaultshareprovider.php @@ -24,7 +24,7 @@ use OCP\Files\File; use OCP\Share\IShareProvider; use OC\Share20\Exception\InvalidShare; use OC\Share20\Exception\ProviderException; -use OC\Share20\Exception\ShareNotFound; +use OCP\Share\Exceptions\ShareNotFound; use OC\Share20\Exception\BackendError; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\Files\NotFoundException; diff --git a/lib/private/share20/exception/sharenotfound.php b/lib/private/share20/exception/sharenotfound.php deleted file mode 100644 index b59f185939a..00000000000 --- a/lib/private/share20/exception/sharenotfound.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * @copyright Copyright (c) 2016, ownCloud, Inc. - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see - * - */ -namespace OC\Share20\Exception; - -class ShareNotFound extends \Exception { - -} diff --git a/lib/private/share20/manager.php b/lib/private/share20/manager.php index b22b81bb404..8ea9d10c1cb 100644 --- a/lib/private/share20/manager.php +++ b/lib/private/share20/manager.php @@ -36,7 +36,7 @@ use OCP\Files\File; use OCP\Files\Folder; use OCP\IUser; -use OC\Share20\Exception\ShareNotFound; +use OCP\Share\Exceptions\ShareNotFound; use OC\HintException; /** diff --git a/lib/public/share/exceptions/genericshareexception.php b/lib/public/share/exceptions/genericshareexception.php new file mode 100644 index 00000000000..83dfa12dbfc --- /dev/null +++ b/lib/public/share/exceptions/genericshareexception.php @@ -0,0 +1,28 @@ + + * + * @copyright Copyright (c) 2016, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see + * + */ + +namespace OCP\Share\Exceptions; + +/** + * Class ShareNotFound + * + * @package OCP\Share\Exceptions + * @since 9.0.0 + */ +class ShareNotFound extends GenericShareException { + +} -- cgit v1.2.3