Quote:When an error condition is detected in a Transact-SQL statement contained in a TRY block, control is passed to a CATCH block where it can be processed.
DECLARE @Num INT
-- generate infinity exception
SET @Num = 5/0
PRINT 'Exception Occured'
The result of the above code will be: