Forum Discussion

AbilAjay's avatar
AbilAjay
Occasional Contributor
2 years ago
Solved

Runner.stop method didn't stop current routine

I have two routine test1() and test2(), i called test1() inside the test2(), like this
def test1():
Log.error("kaboom")

def test2():
test1():
Log.message("hello")
Play back on error property set to "stop current item"

If I run the test2 it's only stop test1 routine alone it's won't stop test2 it will print hello on the console how i stop the execution of routine test2 completely when there is error occurred? Please someone help me, i try onlog error event aslo it's won't work it's only stop one routine alone

4 Replies

    • AbilAjay's avatar
      AbilAjay
      Occasional Contributor

      Thanks, rraghavani now understood, the difference between a test engine (Python Error) error and testcomplete error, Try catch did not handle testcomplete errors like object not found and method not suitable

    • AbilAjay's avatar
      AbilAjay
      Occasional Contributor

      If we use try catch on test1():

      it won't stop, please try that one

      Hello message is printing