Di awal skrip, gunakan SET XACT_ABORT
SET XACT_ABORT ON
Saya tidak berpikir itu akan mungkin:
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