RaiseError Severity Levels - by sfibich

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


8
3
Sign in
to vote
ID 660729 Comments
Status Closed Workarounds
Type Suggestion Repros 0
Opened 4/13/2011 8:21:26 AM
Access Restriction Public

Description

SQL Server 2008 Books Online does not mention that if you pass a -1 to the RaiseError call that it uses the severity level in the sysmessages table by default.  Can this be included in the documentation in future releases and is this something that can be counted on as a feature in the future?
Sign in to post a comment.
Posted by DbaiG on 9/3/2013 at 2:46 AM
Wow, this is really helpful way of dealing with errors. It is good to see that customer complains are being properly attended to. I think it is crucial in tech world as user gets very disappointed if application is not working properly. Providing tech support is really crucial to get an edge in rapidly changing digital world.

DbaiG
Bolee.com
Posted by Microsoft on 8/12/2013 at 5:17 PM
Sorry about the delay in fixing this. It is true that you can use -1 for both the severity and state parameters to return the default values associated with the given error. I've updated the RAISERROR topic for SQL Server 2012 to reflect this. The topic will be published between 8/13/2013 and 8/20/2013.
Posted by Microsoft on 4/18/2011 at 9:13 AM
Thank you for reporting this behavior. We will investigate and update the 2008R2 documentation as appropriate in a future update to Books Online.

Kind Regards,
Gail Erickson
SQL Server Documentation team