I am sure that BEGIN TRY and BEGIN CATCH will stop execution when the error is removed, and execute the execution directly in the error handler:
BEGIN TRY ' do stuff END TRY BEGIN CATCH 'handle END CATCH
Edit: here is an example:
BEGIN TRY DECLARE @int int SET @int = 1 SET @int = 1 / 0 SET @int = 2 SELECT 'Everything OK' END TRY BEGIN CATCH SELECT 'Oops' END CATCH
Comment on the separation by the zero line above to see โEverything is fineโ, otherwise you will see โOopsโ in the result set
source share