diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-01 16:36:08 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-07 13:30:30 +0200 |
commit | 664b2bb7af2c8253aa0bbade42531ad4a3ef6bab (patch) | |
tree | 1f6da0f4a10dbc9345a8dd1716986c16c237f3d9 /lib/private/connector | |
parent | c9d6ed3d7d04412b721745f61402ff1400c59aeb (diff) | |
download | nextcloud-server-664b2bb7af2c8253aa0bbade42531ad4a3ef6bab.tar.gz nextcloud-server-664b2bb7af2c8253aa0bbade42531ad4a3ef6bab.zip |
cleaning up exception mess
Diffstat (limited to 'lib/private/connector')
-rw-r--r-- | lib/private/connector/sabre/file.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php index a436973ba91..f6f5daf2074 100644 --- a/lib/private/connector/sabre/file.php +++ b/lib/private/connector/sabre/file.php @@ -35,7 +35,7 @@ namespace OC\Connector\Sabre; -use OC\Encryption\Exceptions\GenericEncryptionException; +use OCP\Encryption\Exceptions\GenericEncryptionException; class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile { @@ -184,7 +184,7 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile { //throw exception if encryption is disabled but files are still encrypted try { return $this->fileView->fopen(ltrim($this->path, '/'), 'rb'); - } catch (\OCP\Encryption\Exception\EncryptionException $e) { + } catch (\OCP\Encryption\Exceptions\GenericEncryptionException $e) { throw new \Sabre\DAV\Exception\Forbidden($e->getMessage()); } catch (\OCP\Files\StorageNotAvailableException $e) { throw new \Sabre\DAV\Exception\ServiceUnavailable("Failed to open file: ".$e->getMessage()); |