throw new BuildException(t);
}
}
//everything's good, publish the reports
IReporter reporter = new AntReporter(getProject(), haltOnFail,
haltOnError, failureProperty, errorProperty);
for (ReportWriterElement tag : writerTags)
{
try
{
reporter.addReportWriter(tag.newWriterInstance());
} catch (Exception e)
{
xmlSocket.shutdown();
throw new BuildException("Error creating report writer "
+ tag.getClassname(), e, getLocation());
}
}
if (showOutput)
{
reporter.addReportWriter(new AntLogWriter(this));
log("===============================================");
log("| Unit Test Results |");
log("| format: runs/fails/errors SuiteName |");
log("===============================================");
}
try
{
reporter.publishReport(handler.getJSONData());
}
catch (JSONException je)
{
xmlSocket.shutdown();
System.out.println("Error parsing JSON Data:");