My error handle in store procedure is :
Error:
Begin
If (@.errno > 50000)
Begin
Raiserror (@.errno, 16,1, @.errarg1 ) @.errno is 50023 now.
End
RollBack Transaction
End
Where the SqlException is below, I am confused by the Number and the message of the SqlException!
Message: Error 50023, severity 16, state 1 was raised, but no message with that error number was found in sys.messages. If error is larger
Number :18054
Thank you!
The error number you passed to RAISERROR is a custom error number isn't it? So it can't find the number in the sys.messages table.Instead you can pass your own error message to RAISERROR
RAISERROR('A big error has occurred.. alert the president', 16,1) WITH NOWAIT
No comments:
Post a Comment