Browse Source

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 years ago
parent
commit
da9865f8d3
1 changed files with 6 additions and 2 deletions
  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 View File

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


import java.io.BufferedWriter; import java.io.BufferedWriter;
import java.io.File; import java.io.File;
@@ -123,7 +124,10 @@ public class HL7Sender {
try { try {
connection = context.newClient(Main.OPS_IP, port, false); connection = context.newClient(Main.OPS_IP, port, false);
} catch (HL7Exception e) { } 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 // The initiator is used to transmit unsolicited messages
@@ -142,7 +146,7 @@ public class HL7Sender {
Thread.sleep(5000); Thread.sleep(5000);
} }
} catch (HL7Exception | LLPException | IOException | InterruptedException e) { } catch (HL7Exception | LLPException | IOException | InterruptedException e) {
e.printStackTrace();
// e.printStackTrace();
} }


HL7LogEntry responseEntry = new HL7LogEntry(); HL7LogEntry responseEntry = new HL7LogEntry();


Loading…
Cancel
Save