[haXe] rethrown exception
Franco Ponticelli
franco.ponticelli at gmail.com
Mon Apr 10 11:33:01 CEST 2006
I've this code in haXe:
public function testAssert() : Void
{
try
{
Assert.isTrue(false, null);
}
catch(e : xUnit.AssertionException)
{
trace(e);
Assert.isTrue(true, null);
}
}
which compiles this way in JS:
xUnit.TestCaseAssert.prototype.testAssert = function() {
try {
xUnit.Assert.isTrue(false,null);
}
catch( $e ) {
var e = $e;
if( js.Boot.__instanceof($e,xUnit.AssertionException) ) {
Log.trace(e,{ methodName : "testAssert", className : "
xUnit.TestCaseAssert", lineNumber : 25, fileName : "TestCaseAssert.hx"});
xUnit.Assert.isTrue(true,null);
}
throw($e);
}
}
Why the exception is automatically rethrown? Is there a way to prevent this?
In flash the exception is captured and not rethrown ... at leas I think so
...
Thank you,
Franco.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/haxe/attachments/20060410/eb604e50/attachment.htm
More information about the Haxe
mailing list