When you exec script like
begin tran
exec tonytest
rollback tran
commit tran
You will see an error like
Msg 3902, Level 16, State 1, Line 4
The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.
To debug, just make sure only one of rollback and commit works in the same time.
In this case, just delete commit, then bug disappear.
It could be obvious to find out in this script because it's simple,
But when you making a script really complex, it could be hard to find out this bug.