Cancel transactions when exceptions are raised.