final WebTestException e = (WebTestException) rootCause;
addNewAttribute(failure, "message", e.getShortMessage());
for (final Iterator iter = e.getDetails().iterator(); iter.hasNext();) {
final NameValuePair detail = (NameValuePair) iter.next();
final Element detailElt = addNewElement(failure, "detail");
addNewAttribute(detailElt, "name", detail.getName());
addText(detailElt, detail.getValue());
}
}
else
{
addNewAttribute(failure, "message", throwable.getMessage());