minor #25008 [Console] Remove remaining dead code (chalasr)

This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Remove remaining dead code

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Since they are always re-thrown, no need to catch `\Error` instances at all.

Commits
-------

3822c07f65 [Console] Remove remaining dead code
This commit is contained in:
Fabien Potencier 2017-11-18 09:40:15 +02:00
commit 9447016979
1 changed files with 1 additions and 2 deletions

View File

@ -113,11 +113,10 @@ class Application
$e = null;
$exitCode = $this->doRun($input, $output);
} catch (\Exception $e) {
} catch (\Throwable $e) {
}
if (null !== $e) {
if (!$this->catchExceptions || !$e instanceof \Exception) {
if (!$this->catchExceptions) {
throw $e;
}