if (e instanceof LLIOException) {
// XXX: Hideous hack, but the LAPI error strings are hard-coded
// and in English, and I cannot think of another way to
// distinguish this error, which we must distinguish.
if ("Premature end-of-data on socket".equals(e.getMessage())) {
return new RepositoryDocumentException(e);
} else {
return new LivelinkIOException(e, LOGGER);
}
} else if (e instanceof LLBadServerCertificateException
|| e instanceof LLCouldNotConnectException