Kenneth Fisher shows how you can build your own custom SQL Server error messages:
I’m sure lots of you have used the function RAISERROR to handle an error caused by your code. The problem is, what do you do if the error you want to display isn’t one that Microsoft choose to include in the list of errors? (sys.messages)
You have two options.
Read on for those options.