include SQL in exception