Merge pull request #16798 from owncloud/enc_add_hint_to_exception

add hint to exception
This commit is contained in:
Björn Schießle 2015-06-08 22:28:26 +02:00
commit 2ae2da576f
1 changed files with 4 additions and 5 deletions

View File

@ -279,12 +279,11 @@ class Encryption implements IEncryptionModule {
*/
public function decrypt($data) {
if (empty($this->fileKey)) {
$msg = $this->l->t('Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.');
$this->logger->error('Can not decrypt this file,
probably this is a shared file.
Please ask the file owner to reshare the file with you.');
$msg = 'Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.';
$hint = $this->l->t('Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.');
$this->logger->error($msg);
throw new DecryptionFailedException($msg);
throw new DecryptionFailedException($msg, $hint);
}
$result = '';