2015-02-24 13:05:19 -05:00
|
|
|
<?php
|
2024-05-28 10:42:42 -04:00
|
|
|
|
2015-04-07 11:02:49 -04:00
|
|
|
/**
|
2024-05-28 10:42:42 -04:00
|
|
|
* SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2015-02-24 13:05:19 -05:00
|
|
|
*/
|
2015-03-31 05:15:47 -04:00
|
|
|
namespace OCA\Encryption\Exceptions;
|
2015-02-24 13:05:19 -05:00
|
|
|
|
2015-04-01 10:36:08 -04:00
|
|
|
use OCP\Encryption\Exceptions\GenericEncryptionException;
|
|
|
|
|
|
|
|
|
|
class PrivateKeyMissingException extends GenericEncryptionException {
|
2015-02-24 13:05:19 -05:00
|
|
|
|
2015-04-01 10:36:08 -04:00
|
|
|
/**
|
|
|
|
|
* @param string $userId
|
|
|
|
|
*/
|
|
|
|
|
public function __construct($userId) {
|
2020-04-10 08:19:56 -04:00
|
|
|
if (empty($userId)) {
|
2015-04-01 10:36:08 -04:00
|
|
|
$userId = "<no-user-id-given>";
|
|
|
|
|
}
|
|
|
|
|
parent::__construct("Private Key missing for user: $userId");
|
|
|
|
|
}
|
2015-02-24 13:05:19 -05:00
|
|
|
}
|