summaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib/exceptions/privatekeymissingexception.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-04-01 16:36:08 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:30 +0200
commit664b2bb7af2c8253aa0bbade42531ad4a3ef6bab (patch)
tree1f6da0f4a10dbc9345a8dd1716986c16c237f3d9 /apps/encryption/lib/exceptions/privatekeymissingexception.php
parentc9d6ed3d7d04412b721745f61402ff1400c59aeb (diff)
downloadnextcloud-server-664b2bb7af2c8253aa0bbade42531ad4a3ef6bab.tar.gz
nextcloud-server-664b2bb7af2c8253aa0bbade42531ad4a3ef6bab.zip
cleaning up exception mess
Diffstat (limited to 'apps/encryption/lib/exceptions/privatekeymissingexception.php')
-rw-r--r--apps/encryption/lib/exceptions/privatekeymissingexception.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/encryption/lib/exceptions/privatekeymissingexception.php b/apps/encryption/lib/exceptions/privatekeymissingexception.php
index ddc3d11cdbc..50d75870b20 100644
--- a/apps/encryption/lib/exceptions/privatekeymissingexception.php
+++ b/apps/encryption/lib/exceptions/privatekeymissingexception.php
@@ -19,10 +19,20 @@
*
*/
-
namespace OCA\Encryption\Exceptions;
+use OCP\Encryption\Exceptions\GenericEncryptionException;
+
+class PrivateKeyMissingException extends GenericEncryptionException {
-class PrivateKeyMissingException extends \Exception{
+ /**
+ * @param string $userId
+ */
+ public function __construct($userId) {
+ if(empty($userId)) {
+ $userId = "<no-user-id-given>";
+ }
+ parent::__construct("Private Key missing for user: $userId");
+ }
}