bug #33752 [4.4] Fix some leftovers (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion
----------

[4.4] Fix some leftovers

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #33756
| License       | MIT
| Doc PR        | -

Found while running console commands with the Symfony Demo.

Commits
-------

b416c12d29 [4.4] Fix some leftovers
This commit is contained in:
Nicolas Grekas 2019-09-30 12:04:15 +02:00
commit 2b71c6f221
2 changed files with 6 additions and 2 deletions

View File

@ -96,7 +96,7 @@
<argument type="collection">
<argument type="service" key="cli">
<service class="Symfony\Component\VarDumper\Command\Descriptor\CliDescriptor">
<argument type="service" id="var_dumper.cli_dumper" />
<argument type="service" id="var_dumper.contextualized_cli_dumper.inner" />
</service>
</argument>
<argument type="service" key="html">

View File

@ -125,7 +125,11 @@ class DebugHandlersListener implements EventSubscriberInterface
if ($output instanceof ConsoleOutputInterface) {
$output = $output->getErrorOutput();
}
$this->exceptionHandler = function ($e) use ($app, $output) {
$this->exceptionHandler = static function (\Throwable $e) use ($app, $output) {
if (!$e instanceof \Exception) {
$e = new FatalThrowableError($e);
}
$app->renderException($e, $output);
};
}