Also remove code that hides exceptions (see d2ce041c) since we should be constructing valid SQL.
Fixes #4872