diff --git a/lib/Service/FileService.php b/lib/Service/FileService.php index bb63e2f9d..5e4cb2326 100644 --- a/lib/Service/FileService.php +++ b/lib/Service/FileService.php @@ -118,7 +118,7 @@ class FileService implements IAttachmentService { $error = $phpFileUploadErrors[$file['error']]; } if ($error !== null) { - throw new \RuntimeException($error); + throw new \Exception($error); } return $file; } diff --git a/tests/unit/Service/FileServiceTest.php b/tests/unit/Service/FileServiceTest.php index ee0fe80ce..41c48914e 100644 --- a/tests/unit/Service/FileServiceTest.php +++ b/tests/unit/Service/FileServiceTest.php @@ -103,7 +103,7 @@ class FileServiceTest extends TestCase { } /** - * @expectedException \RuntimeException + * @expectedException \Exception */ public function testCreateEmpty() { $attachment = $this->getAttachment(); @@ -112,7 +112,7 @@ class FileServiceTest extends TestCase { } /** - * @expectedException \RuntimeException + * @expectedException \Exception */ public function testCreateError() { $attachment = $this->getAttachment();