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/private/connector/sabre/file.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/private/connector') 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()); -- cgit v1.2.3