Forgot a rollback on an integrity error.
Added better error messages.