The problem was related to the severity I was choosing when calling raiserror(). I was passing in 10 for this argument as I had seen an example that put 10 there, but in order for the error text to get passed to the SQLException the severity must be 11 or higher.
转载于:https://www.cnblogs.com/zhaojin/archive/2011/11/17/2252962.html