Just going through some tutorials at the moment and I see a lot of code in stored procedures as follows.
SET_XACT_ABORT ON BEGIN TRY .... COMMIT TRANSACTION
END TRY BEGIN CATCH ROLLBACK TRANSACTION END CATCH
Just wondering why would the SET_XACT_ABORT ON here would be necessary as wouldn't any throw or raise error be caught in the Catch block anyway and the transaction will be rolled back?
Thanks