better error message when terminology server not available

This commit is contained in:
Grahame Grieve 2019-10-02 14:50:44 +10:00
parent 85a1256b24
commit 511ff03657
1 changed files with 10 additions and 6 deletions

View File

@ -217,12 +217,16 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
}
public String connectToTSServer(TerminologyClient client, String log) throws URISyntaxException, FHIRException {
public String connectToTSServer(TerminologyClient client, String log) {
try {
tlog("Connect to "+client.getAddress());
txClient = client;
txLog = new HTMLClientLogger(log);
txClient.setLogger(txLog);
return txClient.getCapabilitiesStatementQuick().getSoftware().getVersion();
} catch (Exception e) {
throw new FHIRException("Unable to connect to terminology server. Use parameter '-tx n/a' tun run without using terminology services to validate LOINC, SNOMED, ICD-X etc. Error = "+e.getMessage(), e);
}
}
public void loadFromFile(InputStream stream, String name, IContextResourceLoader loader) throws IOException, FHIRException {