Skip to content
Snippets Groups Projects
Commit 1f8c3073 authored by brutzman's avatar brutzman
Browse files

add try/catch for new jar

parent c26f7f76
No related branches found
No related tags found
No related merge requests found
......@@ -427,19 +427,25 @@ public class AllPduSender
byte[] buffer;
Pdu aPdu = generatedPdusList.get(idx);
aPdu.marshal(dos);
buffer = baos.toByteArray();
DatagramPacket packet = new DatagramPacket(buffer, buffer.length, localMulticastAddress, DEFAULT_MULTICAST_PORT);
socket.send(packet);
try {
Thread.sleep(100L);
} catch (InterruptedException ex) {
try
{
aPdu.marshal(dos);
buffer = baos.toByteArray();
DatagramPacket packet = new DatagramPacket(buffer, buffer.length, localMulticastAddress, DEFAULT_MULTICAST_PORT);
socket.send(packet);
try {
Thread.sleep(100L);
} catch (InterruptedException ex) {
}
String currentPduTypeValuePadded = String.format("%2s", aPdu.getPduType().getValue());
String currentPduTypePadded = String.format("%-34s", aPdu.getPduType()); // - indicates right padding of whitespace
System.out.print ("Sent DIS PDU " + currentPduTypeValuePadded + " " + currentPduTypePadded );
System.out.println(" of type " + aPdu.getClass().getName());
}
catch (Exception ex) {
System.out.println("Marshaling error" + ex);
}
String currentPduTypeValuePadded = String.format("%2s", aPdu.getPduType().getValue());
String currentPduTypePadded = String.format("%-34s", aPdu.getPduType()); // - indicates right padding of whitespace
System.out.print ("Sent DIS PDU " + currentPduTypeValuePadded + " " + currentPduTypePadded );
System.out.println(" of type " + aPdu.getClass().getName());
}
// write the PDUs out to an XML file.
//PduContainer container = new PduContainer();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment