I starten af dit script skal du bruge SET XACT_ABORT
SET XACT_ABORT ON
Jeg tror ikke, det vil være muligt:
Ref .
USE AdventureWorks2012;
GO
BEGIN TRY
-- Table does not exist; object name resolution
-- error not caught.
SELECT * FROM NonexistentTable;
END TRY
BEGIN CATCH
SELECT
ERROR_NUMBER() AS ErrorNumber
,ERROR_MESSAGE() AS ErrorMessage;
END CATCH