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

Affected version


Well-known member
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.

Chris D

XenForo developer
Staff member
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.

  • Like
Reactions: Xon

XF Bug Bot

XenForo bug fixer bot
Staff member
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.