Skip to content

Commit 4df941f

Browse files
committed
fix: use runtimeexception when applicable
1 parent 09da620 commit 4df941f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Codeception/Lib/Connector/Yii2.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,9 @@ public function doRequest(object $request): Response
388388

389389
$content = ob_get_clean();
390390
if (empty($content) && !empty($yiiResponse->content) && !isset($yiiResponse->stream)) {
391-
throw new \Exception('No content was sent from Yii application');
391+
throw new \RuntimeException('No content was sent from Yii application');
392392
} elseif ($content === false) {
393-
throw new \Exception('Failed to get output buffer');
393+
throw new \RuntimeException('Failed to get output buffer');
394394
}
395395

396396
return new Response($content, $yiiResponse->statusCode, $yiiResponse->getHeaders()->toArray());

0 commit comments

Comments
 (0)