SqlException has the property Number.
Then there is this: http://msdn.microsoft.com/en-us/library/cc645603.aspx
and this: http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx
And it seems to be one or the other
QUESTION:
How is it decided which?
REASON FOR ASKING:
I need to catch certain SqlExceptions and decide how to deal with them based on the Number property but I don't know which list I should look at when it seems like the system is using messages from both, and I don't know what criteria is used for choosing.
For example:
- Number 53 - from server error message list (exists on both)
- Number 10054 - from system error message list (exists on both)
- Number -1 - from server error message list (exists only on server list)
- Number 121 - from system error message list (exists on both) ......