JScript exception propagation between script units problem in TestComplete 8.5
Good day,
I am experiencing a problem with exception propagation. Similar problems has been discussed here in forum before and I have read that this feature (Exception propagation between script units) has been implemented in TestComplete 8.
I am using TestComplete 8.5. and with code like this:
---------------------------------------------------------------
Unit TestC
---------------------------------------------------------------
//USEUNIT TestB
function classC()
{
this.c = new TestB.classB();
}
classC.prototype.test = function test()
{
try
{
this.c.exNotThrower();
}
catch(e)
{
Log.Error(e.description);
}
}
function test()
{
var a = new classC();
a.test();
}
-----------------------------------------------------------------
Unit TestB
-----------------------------------------------------------------
//USEUNIT TestA
function classB()
{
this.b = 5;
}
classB.prototype.exNotThrower = function exNotThrower()
{
//try
//{
var a = new TestA.classA();
a.exThrower();
//}
//catch(e)
//{
// throw e;
//}
}
-----------------------------------------------------------------
Unit TestA
-----------------------------------------------------------------
function classA()
{
this.a = 5;
}
classA.prototype.exThrower = function exThrower()
{
throw new Error(-1,"Testing exception");
}
exception from Unit TestA is propagated niether in TestB nor TestC.
Has someone similar problem ? What`s your solution or workaround ?
Thanks in advance
Jan Tkacik
FFastfill