diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-03 13:36:14 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-03 13:36:14 +0100 |
commit | aaf7299d2813c1b1b206459b2d7997d3e1cd0526 (patch) | |
tree | 4e9905b450d762fcc3abe7a1e8643aedc0c15310 /lib/public | |
parent | cf81574e877a6468358cc4a1e52cc078b6b01823 (diff) | |
parent | dc32f49c6ee25770b461f11287fd9695f2429c91 (diff) | |
download | nextcloud-server-aaf7299d2813c1b1b206459b2d7997d3e1cd0526.tar.gz nextcloud-server-aaf7299d2813c1b1b206459b2d7997d3e1cd0526.zip |
Merge pull request #22070 from owncloud/share2_exceptions
Add sharing exceptions to OCP
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/share/exceptions/genericshareexception.php | 28 | ||||
-rw-r--r-- | lib/public/share/exceptions/sharenotfound.php | 32 |
2 files changed, 60 insertions, 0 deletions
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 @@ +<?php + +namespace OCP\Share\Exceptions; +use OC\HintException; + +/** + * Class GenericEncryptionException + * + * @package OCP\Share\Exceptions + * @since 9.0.0 + */ +class GenericShareException extends HintException { + + /** + * @param string $message + * @param string $hint + * @param int $code + * @param \Exception $previous + * @since 9.0.0 + */ + public function __construct($message = '', $hint = '', $code = 0, \Exception $previous = null) { + if (empty($message)) { + $message = 'Unspecified share exception'; + } + parent::__construct($message, $hint, $code, $previous); + } + +} diff --git a/lib/public/share/exceptions/sharenotfound.php b/lib/public/share/exceptions/sharenotfound.php new file mode 100644 index 00000000000..96e7c096492 --- /dev/null +++ b/lib/public/share/exceptions/sharenotfound.php @@ -0,0 +1,32 @@ +<?php +/** + * @author Roeland Jago Douma <rullzer@owncloud.com> + * + * @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 <http://www.gnu.org/licenses/> + * + */ + +namespace OCP\Share\Exceptions; + +/** + * Class ShareNotFound + * + * @package OCP\Share\Exceptions + * @since 9.0.0 + */ +class ShareNotFound extends GenericShareException { + +} |