2016-02-02 08:07:11 -05:00
|
|
|
<?php
|
2024-05-23 03:26:56 -04:00
|
|
|
|
2016-03-01 11:25:15 -05:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2016-03-01 11:25:15 -05:00
|
|
|
*/
|
2016-02-02 08:07:11 -05:00
|
|
|
namespace OCP\Share\Exceptions;
|
2020-04-09 05:48:10 -04:00
|
|
|
|
2021-06-29 19:20:33 -04:00
|
|
|
use OCP\HintException;
|
2016-02-02 08:07:11 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class GenericEncryptionException
|
|
|
|
|
*
|
|
|
|
|
* @since 9.0.0
|
|
|
|
|
*/
|
|
|
|
|
class GenericShareException extends HintException {
|
|
|
|
|
/**
|
|
|
|
|
* @param string $message
|
|
|
|
|
* @param string $hint
|
|
|
|
|
* @param int $code
|
2017-07-19 13:44:10 -04:00
|
|
|
* @param \Exception|null $previous
|
2016-02-02 08:07:11 -05:00
|
|
|
* @since 9.0.0
|
|
|
|
|
*/
|
2024-03-28 11:13:19 -04:00
|
|
|
public function __construct($message = '', $hint = '', $code = 0, ?\Exception $previous = null) {
|
2016-02-02 08:07:11 -05:00
|
|
|
if (empty($message)) {
|
2017-05-17 09:35:10 -04:00
|
|
|
$message = 'There was an error retrieving the share. Maybe the link is wrong, it was unshared, or it was deleted.';
|
2016-02-02 08:07:11 -05:00
|
|
|
}
|
|
|
|
|
parent::__construct($message, $hint, $code, $previous);
|
|
|
|
|
}
|
|
|
|
|
}
|