cancel
Showing results for 
Search instead for 
Did you mean: 

throw

Highlighted
Contributor

throw

Hello, is there a way to throw  exception with (propagation) TestsComplete 7.52

For example?



try {

// code to implement

} catch (e) {

   throw e;

}



I have tied something like that but it does not work, does anybody has a better way to do this?

thanks.
1 REPLY 1
Highlighted

RE: throw

Hi Cyril,


You can use the following code:




  try

  {

    try

    {

      throw "test1";

    }

    catch (e)

    {

      throw "test2";

    }

  }

  catch (e)

  {

    Log.Error("Error");

  }


Please see the following MSDN Library article for more information on the "throw" statement (TestComplete uses Microsoft JScript engine):

http://msdn.microsoft.com/en-us/library/85fscz6h(VS.85).aspx


Best regards,
Alexey

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Let's start July with new challenges!

Create a script to pass custom command-line arguments as a test parameter for the TechCorner tag!

Will you dare to take the challenge?


Top Kudoed Authors