I'm using SQL Server 7.0.
When I'm writing stored procedures, I can't seem to trap errors when a command fails like when inserting a row, the key might already exist. At this point, the stored procedure returns the error message. How can I trap this inside the stored procedure, and replace the message with my own message? Is there a way to handle this?