Skip to content

Commit 2c2253d

Browse files
committed
minor symfony#24962 [Console] remove dead code (Tobion)
This PR was merged into the 2.7 branch. Discussion ---------- [Console] remove dead code | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | no <!-- don't forget to update UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Part of symfony#24961 for 2.7 Commits ------- 65f2b13 [Console] remove dead code
2 parents 49fe412 + 65f2b13 commit 2c2253d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Symfony/Component/Console/Application.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,13 @@ public function run(InputInterface $input = null, OutputInterface $output = null
112112
try {
113113
$e = null;
114114
$exitCode = $this->doRun($input, $output);
115-
} catch (\Exception $x) {
116-
$e = $x;
117-
} catch (\Throwable $x) {
118-
$e = new FatalThrowableError($x);
115+
} catch (\Exception $e) {
116+
} catch (\Throwable $e) {
119117
}
120118

121119
if (null !== $e) {
122-
if (!$this->catchExceptions || !$x instanceof \Exception) {
123-
throw $x;
120+
if (!$this->catchExceptions || !$e instanceof \Exception) {
121+
throw $e;
124122
}
125123

126124
if ($output instanceof ConsoleOutputInterface) {

0 commit comments

Comments
 (0)