diff options
Diffstat (limited to 'apps/encryption/lib/exceptions/privatekeymissingexception.php')
-rw-r--r-- | apps/encryption/lib/exceptions/privatekeymissingexception.php | 14 |
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"); + } } |