The idea is that it only terminates processing if the error code is a fatal code. That bit of code you're talking about uses error code 16, which is not fatal. Therefore, the 99 will be returned to the caller, and the caller can also test to discover the error 16. I don't remember what Marco is doing in that code, but you should be able to understand it.
Unfortunately, SQL Server error handling has always been a weakness in my mind. Even though they added real exceptions in 2005, they still don't have as much functionality in exceptions as we'd like, and your current transaction may become unusable in the catch, depending on the nature of the exception. This does make sense, but you need to study up on it before using it so it doesn't bite you.
Use google if you want more info on it. There's a ton of hits if you search for Raiserror.
Eric
|