diff options
Diffstat (limited to 'lib/public/Files/StorageNotAvailableException.php')
-rw-r--r-- | lib/public/Files/StorageNotAvailableException.php | 66 |
1 files changed, 36 insertions, 30 deletions
diff --git a/lib/public/Files/StorageNotAvailableException.php b/lib/public/Files/StorageNotAvailableException.php index f600ef80808..208c7de3238 100644 --- a/lib/public/Files/StorageNotAvailableException.php +++ b/lib/public/Files/StorageNotAvailableException.php @@ -1,34 +1,12 @@ <?php + /** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Björn Schießle <bjoern@schiessle.org> - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Jesús Macias <jmacias@solidgear.es> - * @author Lukas Reschke <lukas@statuscode.ch> - * @author Morris Jobke <hey@morrisjobke.de> - * @author Robin Appelman <robin@icewind.nl> - * @author Robin McCorkell <robin@mccorkell.me.uk> - * @author Roeland Jago Douma <roeland@famdouma.nl> - * @author Vincent Petry <vincent@nextcloud.com> - * - * @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/> - * + * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-FileCopyrightText: 2016 ownCloud, Inc. + * SPDX-License-Identifier: AGPL-3.0-only */ // use OCP namespace for all classes that are considered public. -// This means that they should be used by apps instead of the internal ownCloud classes +// This means that they should be used by apps instead of the internal Nextcloud classes namespace OCP\Files; @@ -36,15 +14,43 @@ use OCP\HintException; /** * Storage is temporarily not available - * @since 6.0.0 - since 8.2.1 based on HintException + * @since 6.0.0 + * @since 8.2.1 based on HintException */ class StorageNotAvailableException extends HintException { + /** + * @since 8.2.0 + */ public const STATUS_SUCCESS = 0; + + /** + * @since 8.2.0 + */ public const STATUS_ERROR = 1; + + /** + * @since 8.2.0 + */ public const STATUS_INDETERMINATE = 2; + + /** + * @since 8.2.0 + */ public const STATUS_INCOMPLETE_CONF = 3; + + /** + * @since 8.2.0 + */ public const STATUS_UNAUTHORIZED = 4; + + /** + * @since 8.2.0 + */ public const STATUS_TIMEOUT = 5; + + /** + * @since 8.2.0 + */ public const STATUS_NETWORK_ERROR = 6; /** @@ -55,8 +61,8 @@ class StorageNotAvailableException extends HintException { * @param \Exception|null $previous * @since 6.0.0 */ - public function __construct($message = '', $code = self::STATUS_ERROR, \Exception $previous = null) { - $l = \OC::$server->getL10N('core'); + public function __construct($message = '', $code = self::STATUS_ERROR, ?\Exception $previous = null) { + $l = \OCP\Util::getL10N('core'); parent::__construct($message, $l->t('Storage is temporarily not available'), $code, $previous); } |