Forum Discussion

jga's avatar
jga
New Contributor
11 years ago

Call Stack inside a Try Catch

All my call stack is lost, when my code is inside a Try Catch



e.g.



1  procedure main()

2  begin

3   try

4       //My full Testcase here

5         if obj.value = ' test'  then   //->value not exists

6              DoSomting;

7    except

8         Log.Error('MyErrorMessage')

9   end;

10 end;



In the call stack i see only two lines

Test        Unit Name     LineNr

Main      myTest.sd       8  ->Only the Except block



Why  a lot of callstack information lost in a try catch block!!!!



if i dont use the try except block i get a lot more informations

in the call stack.



1 Reply

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Jan,


     


    The Call Stack panel collects the information about the routines or keyword tests that were executed. So, I do not see how the try...catch statement can affect it.


    Most probably, your test execution is stopped after that error from the except block is posted to the Test Log. Does this happen? This can explain why you see only one entry in the Call Stack panel.


    Please check whether the Stop on error project option is enabled or disabled.