exec sp_addmessage @msgnum = 60555, @severity = 16,
@msgtext = 'MSIEX:[[%s]]',
@lang = 'us_english';
go
to see your message in messages table:
SELECT * FROM sys.messages
Assert procedure in TSQL :
ALTER PROC usl_AssertionsThrow
@msg VARCHAR(MAX)
AS
BEGIN
RAISERROR ( 60555, 20, 1,@msg) WITH LOG
END
this setting terminate stored procedure after RAISERROR
SET XACT_ABORT ON
more...
No comments:
Post a Comment