Home Forums SQL Server 2005 Development Try Catch alters behaviour of existing procedures RE: Try Catch alters behaviour of existing procedures

  • the problem is that it changes the behaviour of OTHER pre-existing stored procedures

    that already have a defined and tested behaviour

    it breaks them

    a simple example:

    if @@error <> 0 goto label_do_something_else

    won't work if the sp is called from a TRY block

    but will work if called normally

    so a pre-defined behaviour has changed in a subtle way

    as an example, in csharp, calling a method from within a try block or not does not change the called method

    because that would be insane!