throw new StepFailedException("Server took to long to answer: "
+ ste.getMessage(), ste);
}
else if (e instanceof SAXException)
{
throw new StepExecutionException("Response is not well-formed: "
+ e.getMessage(), e);
}
else if (e instanceof XNIException)
{ // XNIException are not helpful, we need to extract the deeply
// nested original exception
final Throwable originalException = StepUtil.extractNestedException(e);
throw new StepExecutionException("XNIException caused by "
+ originalException.getMessage(), originalException);
}
// TODO: See WT-194 should we catch java.io.IOException here and rethrow
// as
// StepFailed with message 'Server closed connection'? This would allow
// retry around this situation
throw new StepExecutionException("Unexpected exception caught: "
+ e.getClass().getName(), e);
}