Fixed XF\DB\Exception does not include SQL query when logging to CLI console

Xon

Well-known member
Affected version
2.1.1
addExtrasToTrace is called when logging to xf_error_log but it is not called when reporting exceptions to the CLI console during upgrades and installs.
 
We don't actually have much control over the rendering of exceptions to the console. That is mostly part of the Symfony console component.

At least, we can't modify the default output, but I have added some additional output at the end.

200942
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.2).

Change log:
When executing CLI commands, in the event that there is a database exception and a query, display that query in the error output.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Top Bottom