/*
* rig up fake CIShellContext so we can get ahold of
* errors sent to logger.
*/
FakeLogCIShellContext fakeCIShellContext =
new FakeLogCIShellContext(testData.getContext());
//dataSoFar.add(currentData);
Converter currentConverter = null;
try {
for (int ii = 0; ii < converters.size(); ii++) {
currentConverter = converters.get(ii);
// No parameters used.
Hashtable<String, Object> parameters = new Hashtable<String, Object>();
currentData =
currentConverter.execute(currentData, parameters, fakeCIShellContext);
if (currentData != null) {
setMetadata(currentData, currentConverter);
dataSoFar.add(currentData);
}
/*
* There are two ways that converters generally fail.
* 1) They throw an exception that propagates out into
* this method, where we catch it.
* 2) They catch their own exception, send it to the logger,
* and return null.
*/
if (currentData == null || currentData[0].getData() == null) {
Converter converter = converters.get(ii);
String explanation = "Result of conversion was null. \r\n";
if (fakeCIShellContext.hasLogEntries()) {
String logText = extractLogText(fakeCIShellContext);
explanation += "Error logger contains the following: \r\n" +
logText;
} else {
explanation += "No errors logged. Cause unknown. \r\n";