Catch all exceptions.
Fix error when 'where' and 'having' conditions have no parameters.