• wolfkillj (2/20/2013)


    L' Eomot Inversé (2/20/2013)


    Nice interesting question.

    I really must upgrade and get SQL2012 so that I can start playing with this stuff instead of just reading about it.

    If people have run the code and got 14 for erros state, what's going on? I would expect to see 14 only if THROW was called without any parameters (to rethrow the previous error).

    I think people said they got severity level 14, not error state 14. They must be looking at the results of the SELECT in the CATCH block, which does show Level = 14, rather than the error message returned by the THROW statement, which always shows "Level 16" as its defined behavior.

    Hey from BOL, I was infering that when THROW is used in a catch block without any parameters, it returns the level of the actual error raised in the try block and not 16...

    Please let me know if I am right?

    ___________________________________________________________________
    If I can answer a question then anyone can answer it..trying to reverse the logic.. :hehe: