Use generic Exception

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2018-06-17 21:47:59 +02:00
parent 5b95beb153
commit 0f50f8d1d9
2 changed files with 3 additions and 3 deletions

View File

@@ -118,7 +118,7 @@ class FileService implements IAttachmentService {
$error = $phpFileUploadErrors[$file['error']]; $error = $phpFileUploadErrors[$file['error']];
} }
if ($error !== null) { if ($error !== null) {
throw new \RuntimeException($error); throw new \Exception($error);
} }
return $file; return $file;
} }

View File

@@ -103,7 +103,7 @@ class FileServiceTest extends TestCase {
} }
/** /**
* @expectedException \RuntimeException * @expectedException \Exception
*/ */
public function testCreateEmpty() { public function testCreateEmpty() {
$attachment = $this->getAttachment(); $attachment = $this->getAttachment();
@@ -112,7 +112,7 @@ class FileServiceTest extends TestCase {
} }
/** /**
* @expectedException \RuntimeException * @expectedException \Exception
*/ */
public function testCreateError() { public function testCreateError() {
$attachment = $this->getAttachment(); $attachment = $this->getAttachment();