From 0f50f8d1d9f04af9f8be7ebab802ed22135919e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Sun, 17 Jun 2018 21:47:59 +0200 Subject: [PATCH] Use generic Exception MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Service/FileService.php | 2 +- tests/unit/Service/FileServiceTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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();