Distinguish errors I raise from other SQL Server errors
In my stored procedures, when a business rule is broken I raise an error that bubbles up to the C# client app and gets displayed to the user. e.g.
In my stored procedures, when a business rule is broken I raise an error that bubbles up to the C# client app and gets displayed to the user. e.g.
I want operators to be notified when I throw a custom error message. My understanding is that I need to add a message to sys.messages, then I can either RAISERROR
or THROW
that error ID. Creating an alert on the message ID and setting it to send to operators should create those notifications.