Ver código fonte

Beim Versuch eine Connection aufzubauen zu einem OPS Server der nicht an ist, kommt jetzt keine Exception mehr sondern es passiert einfach gar nichts mehr bzw. LOG wird geschrieben.

master
Nils Dittberner 10 anos atrás
pai
commit
da9865f8d3
1 arquivos alterados com 6 adições e 2 exclusões
  1. +6
    -2
      src/main/java/de/uniluebeck/mi/projmi6/hapi/HL7Sender.java

+ 6
- 2
src/main/java/de/uniluebeck/mi/projmi6/hapi/HL7Sender.java Ver arquivo

@@ -17,6 +17,7 @@ import de.uniluebeck.mi.projmi6.model.Diagnose;
import de.uniluebeck.mi.projmi6.model.Fall;
import de.uniluebeck.mi.projmi6.model.HL7LogEntry;
import de.uniluebeck.mi.projmi6.model.Patient;
import org.slf4j.LoggerFactory;

import java.io.BufferedWriter;
import java.io.File;
@@ -123,7 +124,10 @@ public class HL7Sender {
try {
connection = context.newClient(Main.OPS_IP, port, false);
} catch (HL7Exception e) {
e.printStackTrace();
// e.printStackTrace();
LoggerFactory.getLogger(HL7Sender.class).warn("Konnte aus irgendeinem Grund keine HL7 Nachricht senden. OPS Server down?");
server.stop();
return;
}

// The initiator is used to transmit unsolicited messages
@@ -142,7 +146,7 @@ public class HL7Sender {
Thread.sleep(5000);
}
} catch (HL7Exception | LLPException | IOException | InterruptedException e) {
e.printStackTrace();
// e.printStackTrace();
}

HL7LogEntry responseEntry = new HL7LogEntry();


Carregando…
Cancelar
Salvar