return ret;
}
} catch (ClassCastException e) {
throw new SettingsException("'remote/" + CFG_HTML_MAPPING + "' configuration section is invalid");
} catch (Exception e) {
throw new RemoteDocumentNotFoundException("HTML document can't be processed: " + e.getMessage(), e);
}
} else {
throw new RemoteDocumentNotFoundException("HTML document can't be processed as it is not html but: "
+ response.contentType);
}
} catch (ClientProtocolException e) {
if (e.getCause() != null)
throw new RemoteDocumentNotFoundException(e.getCause());
else
throw new RemoteDocumentNotFoundException(e);
} catch (HttpCallException e) {
if (e.getStatusCode() == HttpStatus.SC_NOT_FOUND) {
throw new RemoteDocumentNotFoundException(e);
} else {
throw e;
}
} catch (URISyntaxException e) {
throw new RemoteDocumentNotFoundException("URL of sitemap is invalid: " + e.getMessage(), e);
}
}