Handling Errors in Stored Procedures Good article, but I would like to have seen a bit more depth. Also:
1. You state that with fatal errors, there is no code you can implement that will allow you to handle them gracefully. This is true, but if you code the Stored Proceedure to use transactions, then the transaction will roll back automatically on fatal error, no? Also, you can configure the Agent to take action on specific (fatal) errors.
2. I would love to have seen a better description of @@RAISEERROR parameters. What is the STATE parameter for, and how can it be used? The NOWAIT option is confusing. If an error is fatal, then the client is notified immmediately, no? Would NOWAIT cause the client to be notified immediately of nonfatal errors, while the Stored Proceedure continues to run?
3. I am hoping you could document a centralised error handling system that takes specific actions depending on the error type. (I have developed my own, but it could be better.) Finally, I can't wait to read your next ADO article.
Stephen Barash