{
// call stack of ant calls (if any)
final Element antCallStack = addNewElement(failure, "antStack");
for (int i=locations.size()-1; i>=0; --i)
{
final Location loc = (Location) locations.get(i);
final Element antCall = addNewElement(antCallStack, "call");
antCall.setAttribute("filename", loc.getFileName());
antCall.setAttribute("line", String.valueOf(loc.getLineNumber()));
}
}
if (rootCause instanceof WebTestException)
{
final WebTestException e = (WebTestException) rootCause;