You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BUT if creation of console presenter / application fails (for example, when I misconfigured some service that gets used in injectPrimary of Nette\Application\UI\Presenter), the Nette application simply quits, because the console application does not run at all and there is no output at all.
I guess the solution would be to setup the Nette application onError handler in the CliPresenter, directly before it calls $this->console->run, would that be OK? Am I missing the point of setting the onError so early?
I would gladly prepare the PR if this or other solution is approved.
The text was updated successfully, but these errors were encountered:
Hi,
the DI extension exits the application on error, silencing default error handler as the console application formats the errors better. (
Console/src/DI/ConsoleExtension.php
Line 192 in 28bc206
Console/src/Application.php
Line 148 in 28bc206
BUT if creation of console presenter / application fails (for example, when I misconfigured some service that gets used in injectPrimary of Nette\Application\UI\Presenter), the Nette application simply quits, because the console application does not run at all and there is no output at all.
I guess the solution would be to setup the Nette application onError handler in the CliPresenter, directly before it calls $this->console->run, would that be OK? Am I missing the point of setting the onError so early?
I would gladly prepare the PR if this or other solution is approved.
The text was updated successfully, but these errors were encountered: