There should be no executable code between begin transaction and try, the try operator was not found after calling begin transaction
BeginTransaction();
CommitTransaction();
BeginTransaction();
Try
// ...
CommitTransaction();
Except
// ...
RollbackTransaction();
// ...
Raise;
EndTry;