Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 015da50

Browse filesBrowse files
authored
Use do-while
1 parent c47cd70 commit 015da50
Copy full SHA for 015da50

File tree

1 file changed

+3
-8
lines changed
Filter options

1 file changed

+3
-8
lines changed

‎src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php
+3-8Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,12 @@ public function onKernelException(GetResponseForExceptionEvent $event)
5656
} catch (\Exception $e) {
5757
$this->logException($e, sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', \get_class($e), $e->getMessage(), $e->getFile(), $e->getLine()));
5858

59-
if ($exception === $e) {
60-
throw $e;
61-
}
62-
63-
$wrapper = $e;
64-
65-
while ($prev = $wrapper->getPrevious()) {
59+
$prev = $e;
60+
do {
6661
if ($exception === $wrapper = $prev) {
6762
throw $e;
6863
}
69-
}
64+
} while ($prev = $wrapper->getPrevious());
7065

7166
$prev = new \ReflectionProperty($wrapper instanceof \Exception ? \Exception::class : \Error::class, 'previous');
7267
$prev->setAccessible(true);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.