From 664b2bb7af2c8253aa0bbade42531ad4a3ef6bab Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Wed, 1 Apr 2015 16:36:08 +0200 Subject: cleaning up exception mess --- .../lib/exceptions/privatekeymissingexception.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'apps/encryption/lib/exceptions/privatekeymissingexception.php') 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 = ""; + } + parent::__construct("Private Key missing for user: $userId"); + } } -- cgit v1.2.3