private void updateUI(InvocationTargetException exception, Method method, Object[] args)
throws IOException {
String url = "";
String htmlResponse = "";
HttpUnitDialog dialog = tester.getDialog();
if (dialog != null) {
url = dialog.getResponse().getURL().toString();
htmlResponse = dialog.getResponse().getText();
}
Throwable cause = exception==null?null:exception.getCause();
updateUI(getTestName(), url, htmlResponse, getMethodCall(method, args), cause);
}