rdbms: make query exceptions include the backtrace when logged