THROW 50001, 'Error message', 1;
begin try select 'using throw' select 1 / 0 end try begin catch --throw error throw end catch
(1 row(s) affected) (0 row(s) affected) Msg 8134, Level 16, State 1, Line 3 Divide by zero error encountered.