summaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib/Exceptions/PublicKeyMissingException.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2016-05-12 09:42:19 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-05-12 09:42:19 +0200
commit4a3311f430ec6e45c62b2ebde2cae71e943f3c81 (patch)
treec458849ef6918aa0017f14878df54733140be389 /apps/encryption/lib/Exceptions/PublicKeyMissingException.php
parentc5ae14453a2c199752b8369545d983c56a521d30 (diff)
downloadnextcloud-server-4a3311f430ec6e45c62b2ebde2cae71e943f3c81.tar.gz
nextcloud-server-4a3311f430ec6e45c62b2ebde2cae71e943f3c81.zip
Move Encryption app to PSR-4 (#24524)
* Move Encryption to PSR-4 * Move encryption tests to PSR-4 * Fix the tests
Diffstat (limited to 'apps/encryption/lib/Exceptions/PublicKeyMissingException.php')
-rw-r--r--apps/encryption/lib/Exceptions/PublicKeyMissingException.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/apps/encryption/lib/Exceptions/PublicKeyMissingException.php b/apps/encryption/lib/Exceptions/PublicKeyMissingException.php
new file mode 100644
index 00000000000..6fad4693dcc
--- /dev/null
+++ b/apps/encryption/lib/Exceptions/PublicKeyMissingException.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * @author Thomas Müller <thomas.mueller@tmit.eu>
+ *
+ * @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 OCA\Encryption\Exceptions;
+
+use OCP\Encryption\Exceptions\GenericEncryptionException;
+
+class PublicKeyMissingException extends GenericEncryptionException {
+
+ /**
+ * @param string $userId
+ */
+ public function __construct($userId) {
+ if(empty($userId)) {
+ $userId = "<no-user-id-given>";
+ }
+ parent::__construct("Public Key missing for user: $userId");
+ }
+
+}