Catching an error in a batch transaction - C#