Ask a Question

throw

hencyr
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

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

cancel
Showing results for 
Search instead for 
Did you mean: