rollback the transaction when an exception occurs