Skip to content

Commit d9a0589

Browse files
authored
Merge pull request #1 from Micro-PHP/v1.0-release
v1.0.1 released
2 parents 282976e + fefde17 commit d9a0589

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Business/Executor/HttpExceptionExecutorDecorator.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ public function execute(Request $request, bool $flush = true): Response
3333
try {
3434
return $this->decorated->execute($request, $flush);
3535
} catch (\Throwable $throwable) {
36-
if (!$flush) {
37-
throw $throwable;
38-
}
39-
4036
if (!($throwable instanceof HttpException)) {
4137
$throwable = new HttpInternalServerException('Internal Server Error.', $throwable);
4238
}
4339

40+
if (!$flush) {
41+
throw $throwable;
42+
}
43+
4444
$response = new Response(
4545
$throwable->getMessage(),
4646
$throwable->getCode(),

0 commit comments

Comments
 (0)